Skip to content

[native] Enable sidecar in presto-native-tests module #25174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public static QueryRunner createNativeQueryRunner(String remoteFunctionServerUds
return createNativeQueryRunner(false, DEFAULT_STORAGE_FORMAT, Optional.ofNullable(remoteFunctionServerUds), false, false, false, false, false);
}

public static QueryRunner createNativeQueryRunner(Map<String, String> extraProperties, String storageFormat)
public static QueryRunner createNativeQueryRunner(Map<String, String> extraProperties, String storageFormat, boolean isCoordinatorSidecarEnabled)
throws Exception
{
int cacheMaxSize = 0;
Expand All @@ -439,7 +439,7 @@ public static QueryRunner createNativeQueryRunner(Map<String, String> extraPrope
storageFormat,
true,
false,
false,
isCoordinatorSidecarEnabled,
false,
false,
false,
Expand Down
13 changes: 13 additions & 0 deletions presto-native-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-native-sidecar-plugin</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-native-sidecar-plugin</artifactId>
<scope>test</scope>
<type>test-jar</type>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,21 @@
import java.time.format.DateTimeFormatter;
import java.util.Objects;

import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;
import static com.google.common.base.Preconditions.checkState;

public class TestDistributedEngineOnlyQueries
extends AbstractTestEngineOnlyQueries
{
private static final String timeTypeUnsupportedError = ".*Failed to parse type \\[time.*";
private static final String timeTypeUnsupportedError = "^Unknown type time.*";

@Parameters("storageFormat")
@Override
protected QueryRunner createQueryRunner() throws Exception
{
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"), true);
setupNativeSidecarPlugin(queryRunner);
return queryRunner;
}

@Parameters("storageFormat")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;

public class TestOrderByQueries
extends AbstractTestOrderByQueries
{
@Parameters("storageFormat")
@Override
protected QueryRunner createQueryRunner() throws Exception
{
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"), true);
setupNativeSidecarPlugin(queryRunner);
return queryRunner;
}

@Parameters("storageFormat")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@
import com.google.common.collect.ImmutableMap;
import org.testng.annotations.Parameters;

import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;

public class TestRepartitionQueries
extends AbstractTestRepartitionQueries
{
@Parameters("storageFormat")
@Override
protected QueryRunner createQueryRunner() throws Exception
{
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"), true);
setupNativeSidecarPlugin(queryRunner);
return queryRunner;
}

@Parameters("storageFormat")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,22 @@
import com.google.common.collect.ImmutableMap;
import org.testng.annotations.Parameters;

import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;

public class TestRepartitionQueriesWithSmallPages
extends AbstractTestRepartitionQueries
{
@Parameters("storageFormat")
@Override
protected QueryRunner createQueryRunner() throws Exception
{
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(
// Use small SerializedPages to force flushing
ImmutableMap.of("driver.max-page-partitioning-buffer-size", "200B"),
System.getProperty("storageFormat"));
System.getProperty("storageFormat"),
true);
setupNativeSidecarPlugin(queryRunner);
return queryRunner;
}

@Parameters("storageFormat")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import static com.facebook.presto.sidecar.NativeSidecarPluginQueryRunnerUtils.setupNativeSidecarPlugin;

public class TestWindowQueries
extends AbstractTestWindowQueries
{
Expand All @@ -30,7 +32,9 @@ public class TestWindowQueries
@Override
protected QueryRunner createQueryRunner() throws Exception
{
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"));
QueryRunner queryRunner = PrestoNativeQueryRunnerUtils.createNativeQueryRunner(ImmutableMap.of(), System.getProperty("storageFormat"), true);
setupNativeSidecarPlugin(queryRunner);
return queryRunner;
}

@Parameters("storageFormat")
Expand Down
Loading