Skip to content

Commit 6536cf9

Browse files
pdabre12Pratik Joseph Dabre
authored and
Pratik Joseph Dabre
committed
Test commit
1 parent 17299ba commit 6536cf9

File tree

7 files changed

+48
-9
lines changed

7 files changed

+48
-9
lines changed

presto-native-execution/src/test/java/com/facebook/presto/nativeworker/PrestoNativeQueryRunnerUtils.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public static QueryRunner createNativeQueryRunner(String remoteFunctionServerUds
424424
return createNativeQueryRunner(false, DEFAULT_STORAGE_FORMAT, Optional.ofNullable(remoteFunctionServerUds), false, false, false, false, false);
425425
}
426426

427-
public static QueryRunner createNativeQueryRunner(Map<String, String> extraProperties, String storageFormat)
427+
public static QueryRunner createNativeQueryRunner(Map<String, String> extraProperties, String storageFormat, boolean isCoordinatorSidecarEnabled)
428428
throws Exception
429429
{
430430
int cacheMaxSize = 0;
@@ -439,7 +439,7 @@ public static QueryRunner createNativeQueryRunner(Map<String, String> extraPrope
439439
storageFormat,
440440
true,
441441
false,
442-
false,
442+
isCoordinatorSidecarEnabled,
443443
false,
444444
false,
445445
false,
@@ -452,6 +452,12 @@ public static QueryRunner createNativeQueryRunner(boolean useThrift)
452452
return createNativeQueryRunner(useThrift, DEFAULT_STORAGE_FORMAT);
453453
}
454454

455+
public static QueryRunner createNativeQueryRunner(boolean useThrift, boolean failOnNestedLoopJoin, boolean isCoordinatorSidecarEnabled, String storageFormat)
456+
throws Exception
457+
{
458+
return createNativeQueryRunner(useThrift, storageFormat, Optional.empty(), failOnNestedLoopJoin, isCoordinatorSidecarEnabled, false, false, false);
459+
}
460+
455461
public static QueryRunner createNativeQueryRunner(boolean useThrift, boolean failOnNestedLoopJoin)
456462
throws Exception
457463
{

presto-native-tests/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@
5454
<groupId>com.google.guava</groupId>
5555
<artifactId>guava</artifactId>
5656
</dependency>
57+
<dependency>
58+
<groupId>com.facebook.presto</groupId>
59+
<artifactId>presto-native-sidecar-plugin</artifactId>
60+
<scope>test</scope>
61+
</dependency>
62+
63+
<dependency>
64+
<groupId>com.facebook.presto</groupId>
65+
<artifactId>presto-native-sidecar-plugin</artifactId>
66+
<scope>test</scope>
67+
<type>test-jar</type>
68+
<version>${project.version}</version>
69+
</dependency>
5770
</dependencies>
5871

5972
<build>

presto-native-tests/src/test/java/com/facebook/presto/nativetests/TestDistributedEngineOnlyQueries.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,21 @@
2828
import java.time.format.DateTimeFormatter;
2929
import java.util.Objects;
3030

31+
import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;
3132
import static com.google.common.base.Preconditions.checkState;
3233

3334
public class TestDistributedEngineOnlyQueries
3435
extends AbstractTestEngineOnlyQueries
3536
{
36-
private static final String timeTypeUnsupportedError = ".*Failed to parse type \\[time.*";
37+
private static final String timeTypeUnsupportedError = "^Unknown type time.*";
3738

3839
@Parameters("storageFormat")
3940
@Override
4041
protected QueryRunner createQueryRunner() throws Exception
4142
{
42-
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
43+
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(false, false, true, System.getProperty("storageFormat"));
44+
setupNativeSidecarPlugin(queryRunner);
45+
return queryRunner;
4346
}
4447

4548
@Parameters("storageFormat")

presto-native-tests/src/test/java/com/facebook/presto/nativetests/TestOrderByQueries.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@
2121
import org.testng.annotations.Parameters;
2222
import org.testng.annotations.Test;
2323

24+
import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;
25+
2426
public class TestOrderByQueries
2527
extends AbstractTestOrderByQueries
2628
{
2729
@Parameters("storageFormat")
2830
@Override
2931
protected QueryRunner createQueryRunner() throws Exception
3032
{
31-
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
33+
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(false, false, true, System.getProperty("storageFormat"));
34+
setupNativeSidecarPlugin(queryRunner);
35+
return queryRunner;
3236
}
3337

3438
@Parameters("storageFormat")

presto-native-tests/src/test/java/com/facebook/presto/nativetests/TestRepartitionQueries.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@
2020
import com.google.common.collect.ImmutableMap;
2121
import org.testng.annotations.Parameters;
2222

23+
import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;
24+
2325
public class TestRepartitionQueries
2426
extends AbstractTestRepartitionQueries
2527
{
2628
@Parameters("storageFormat")
2729
@Override
2830
protected QueryRunner createQueryRunner() throws Exception
2931
{
30-
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
32+
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(false, false, true, System.getProperty("storageFormat"));
33+
setupNativeSidecarPlugin(queryRunner);
34+
return queryRunner;
3135
}
3236

3337
@Parameters("storageFormat")

presto-native-tests/src/test/java/com/facebook/presto/nativetests/TestRepartitionQueriesWithSmallPages.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,22 @@
2020
import com.google.common.collect.ImmutableMap;
2121
import org.testng.annotations.Parameters;
2222

23+
import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;
24+
2325
public class TestRepartitionQueriesWithSmallPages
2426
extends AbstractTestRepartitionQueries
2527
{
2628
@Parameters("storageFormat")
2729
@Override
2830
protected QueryRunner createQueryRunner() throws Exception
2931
{
30-
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(
32+
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(
3133
// Use small SerializedPages to force flushing
3234
ImmutableMap.of("driver.max-page-partitioning-buffer-size", "200B"),
33-
System.getProperty("storageFormat"));
35+
System.getProperty("storageFormat"),
36+
true);
37+
setupNativeSidecarPlugin(queryRunner);
38+
return queryRunner;
3439
}
3540

3641
@Parameters("storageFormat")

presto-native-tests/src/test/java/com/facebook/presto/nativetests/TestWindowQueries.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import org.testng.annotations.Parameters;
2222
import org.testng.annotations.Test;
2323

24+
import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;
25+
2426
public class TestWindowQueries
2527
extends AbstractTestWindowQueries
2628
{
@@ -30,7 +32,9 @@ public class TestWindowQueries
3032
@Override
3133
protected QueryRunner createQueryRunner() throws Exception
3234
{
33-
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
35+
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(false, false, true, System.getProperty("storageFormat"));
36+
setupNativeSidecarPlugin(queryRunner);
37+
return queryRunner;
3438
}
3539

3640
@Parameters("storageFormat")

0 commit comments

Comments
 (0)