-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[native] Introduce module presto-native-tests #24234
base: master
Are you sure you want to change the base?
Conversation
6f3ef6f
to
ceeabce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the documentation! I made some suggestions for ease of reading and clarity.
If you feel that any of my suggestions change the meaning in a way that is not correct, let me know and we can work on them together.
ceeabce
to
8f606ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback @steveburnett, addressed the comments, could you please take another look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for addressing the comments! Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pramodsatya : Lets move the second commit to refactor presto-tests in a separate PR. That would make it easier to review. Lets add this work as a motivation for that refactoring.
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-tests</artifactId> | ||
<version>${project.version}</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this particular module tried to ${project.version} and not other modules ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing it out, added for other modules as well.
protected QueryRunner createQueryRunner() throws Exception | ||
{ | ||
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner( | ||
ImmutableMap.of("experimental.iterative-optimizer-enabled", "false"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do ? Its important to specify why this test configuration matters.
} | ||
|
||
@Override | ||
protected void createTables() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this function be moved to AbstractTestQueriesNative ?
assertQuery("select reduce_agg(x, array[], (x, y)->array[element_at(x, 2)], (x, y)->array[element_at(x, 2)]) from (select array[array[1]]) T(x)", "select array[null]"); | ||
} | ||
|
||
// The following approx_set function tests are overriden since approx_set returns different results in Presto C++. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any outward article or documentation for this ? If not, then we should write one.
@Test | ||
public void testArrayCumSumDecimals() | ||
{ | ||
String functionNotRegisteredError = ".*Scalar function presto.default.array_cum_sum not registered with arguments.*"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have this error because we don't have this functionality ? I don't see a reason for not building it. Do we have an issue for this ? Please create one if its not there and add the link here.
|
||
@Override | ||
@Test | ||
public void testDuplicateUnnestRows() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an issue for this ?
|
||
@Override | ||
@Test | ||
public void testSamplingJoinChain() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key_sampling seems like an important feature. Do we have an issue ?
|
||
@Override | ||
@Test | ||
public void testScalarSubquery() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this test separated from the java one ?
|
||
@Override | ||
@Test | ||
public void testLikePrefixAndSuffixWithChars() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These failures are because CHAR Is not supported. Lets add the issue here.
But also any reason these are written with CHAR and not VARCHAR ? We could try to split the original test.
} | ||
|
||
@Override | ||
public void testMergeKHyperLogLog() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an issue for the type not supported and link it here.
8f606ce
to
a42b0c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aditi-pandit, addressed the comments and created missing issues. Also modified this PR to only include test classes with fewer modifications as discussed. Will open follow-up PRs for the remaining larger test classes from #23671, such as AbstractTestQueriesNative.java
.
Could you please take another look?
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-tests</artifactId> | ||
<version>${project.version}</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing it out, added for other modules as well.
a42b0c7
to
bdd1b9f
Compare
Co-authored-by: Manoj Negi <[email protected]>
bdd1b9f
to
7e62480
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pramodsatya
private static final String storageFormat = "PARQUET"; | ||
|
||
@Override | ||
protected QueryRunner createQueryRunner() throws Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan to overload the expected query runner with the JavaQueryRunner as well ?
@Override | ||
protected QueryRunner createQueryRunner() throws Exception | ||
{ | ||
return PrestoNativeQueryRunnerUtils.createNativeQueryRunner( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does native engine support these session properties ? Will native side-car catch these ?
needs: prestocpp-linux-build-for-test | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: prestodb/presto-native-dependency:0.290-20241014120930-e1fc090 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this hardcoded version ?
Description
Introduces module
presto-native-tests
to run end-to-end tests with Presto native workers. Adds Github action to run these tests.Motivation and Context
Improves Presto native test coverage by extending production tests from
presto-tests
module to use the native worker. For full context please refer to #23671.Contributor checklist