[native] Introduce module presto-native-tests#24234
[native] Introduce module presto-native-tests#24234pramodsatya merged 2 commits intoprestodb:masterfrom
Conversation
6f3ef6f to
ceeabce
Compare
steveburnett
left a comment
There was a problem hiding this comment.
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
pramodsatya
left a comment
There was a problem hiding this comment.
Thanks for the feedback @steveburnett, addressed the comments, could you please take another look?
steveburnett
left a comment
There was a problem hiding this comment.
LGTM!
Thanks for addressing the comments! Looks good.
aditi-pandit
left a comment
There was a problem hiding this comment.
@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.
| protected QueryRunner createQueryRunner() throws Exception | ||
| { | ||
| return PrestoNativeQueryRunnerUtils.createNativeQueryRunner( | ||
| ImmutableMap.of("experimental.iterative-optimizer-enabled", "false"), |
There was a problem hiding this comment.
What does this do ? Its important to specify why this test configuration matters.
| } | ||
|
|
||
| @Override | ||
| protected void createTables() |
There was a problem hiding this comment.
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.
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.
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.
Do we have an issue for this ?
|
|
||
| @Override | ||
| @Test | ||
| public void testSamplingJoinChain() |
There was a problem hiding this comment.
key_sampling seems like an important feature. Do we have an issue ?
|
|
||
| @Override | ||
| @Test | ||
| public void testScalarSubquery() |
There was a problem hiding this comment.
Why is this test separated from the java one ?
|
|
||
| @Override | ||
| @Test | ||
| public void testLikePrefixAndSuffixWithChars() |
There was a problem hiding this comment.
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.
Add an issue for the type not supported and link it here.
8f606ce to
a42b0c7
Compare
pramodsatya
left a comment
There was a problem hiding this comment.
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?
bdd1b9f to
7e62480
Compare
aditi-pandit
left a comment
There was a problem hiding this comment.
Thanks @pramodsatya
| private static final String storageFormat = "PARQUET"; | ||
|
|
||
| @Override | ||
| protected QueryRunner createQueryRunner() throws Exception |
There was a problem hiding this comment.
Do we plan to overload the expected query runner with the JavaQueryRunner as well ?
There was a problem hiding this comment.
No we do not plan to overload the expected query runner with javaQueryRunner because it does not account for the datatypes of the computed result when comparing it with the expected values. This limitation is noted here.
| @Override | ||
| protected QueryRunner createQueryRunner() throws Exception | ||
| { | ||
| return PrestoNativeQueryRunnerUtils.createNativeQueryRunner( |
There was a problem hiding this comment.
Does native engine support these session properties ? Will native side-car catch these ?
There was a problem hiding this comment.
Thanks for pointing it out, the property experimental.optimized-repartitioning is not applicable to the native engine so removed it. Native engine does support driver.max-page-partitioning-buffer-size, which is required for this test, so retained this config.
The native sidecar currently does not throw an error if a session property is set that is not supported by native engine, this is to support heterogeneous environments. The sidecar is enabled now.
b8c41e4 to
2b7da84
Compare
a6b9b90 to
f7e6ff8
Compare
| assertQuery(chicago, "SELECT DATE '2013-03-22'"); | ||
| assertQuery(kathmandu, "SELECT DATE '2013-03-22'"); | ||
|
|
||
| assertQueryFails("SELECT TIME '3:04:05'", timeTypeUnsupportedError); |
There was a problem hiding this comment.
@pramodsatya : These are constants and should be evaluated in the co-ordinator. Any more insight into why they failed ? Is it because of side-car ?
There was a problem hiding this comment.
@aditi-pandit, apologies for the delay. Not sure why this is not evaluated in the coordinator but it is not because of the sidecar. Here is the output of explain:
presto> explain SELECT TIME '3:04:05';
Query Plan
--------------------------------------------------------------------------------------------------------------------
- Output[PlanNodeId 5][_col0] => [expr:time]
Estimates: {source: CostBasedSourceInfo, rows: 1 (9B), cpu: 9.00, memory: 0.00, network: 0.00}
_col0 := expr (1:16)
- Project[PlanNodeId 1][projectLocality = LOCAL] => [expr:time]
Estimates: {source: CostBasedSourceInfo, rows: 1 (9B), cpu: 9.00, memory: 0.00, network: 0.00}
expr := TIME'03:04:05.000'
- LocalExchange[PlanNodeId 168][ROUND_ROBIN] () => []
Estimates: {source: CostBasedSourceInfo, rows: 1 (9B), cpu: 0.00, memory: 0.00, network: 0.00}
- Values[PlanNodeId 0] => []
Estimates: {source: CostBasedSourceInfo, rows: 1 (9B), cpu: 0.00, memory: 0.00, network: 0.00}
()
aditi-pandit
left a comment
There was a problem hiding this comment.
@pramodsatya : This PR is looking very close to complete.
@czentgr : Please can you take a look at the yml and pom files.
presto-tests/src/main/java/com/facebook/presto/tests/QueryAssertions.java
Outdated
Show resolved
Hide resolved
presto-tests/src/main/java/com/facebook/presto/tests/AbstractTestQueryFramework.java
Outdated
Show resolved
Hide resolved
presto-tests/src/main/java/com/facebook/presto/tests/AbstractTestQueryFramework.java
Outdated
Show resolved
Hide resolved
...ve-tests/src/test/java/com.facebook.presto.nativetests/TestDistributedEngineOnlyQueries.java
Show resolved
Hide resolved
...ve-tests/src/test/java/com.facebook.presto.nativetests/TestDistributedEngineOnlyQueries.java
Show resolved
Hide resolved
f7e6ff8 to
7dded38
Compare
|
Please remove the manual PR link in the following format from the release note entries for this PR. I have updated the Release Notes Guidelines to remove the examples of manually adding the PR link. |
7dded38 to
531ed76
Compare
531ed76 to
d570eb3
Compare
|
@amitkdutta @jaystarshot : This PR is the first version of presto-native-tests. This is the suite to run all Java presto-product-tests with the native engine. Would be great to get your reviews for this PR. |
Co-authored-by: Manoj Negi <manojneg@in.ibm.com>
Co-authored-by: Manoj Negi <manojneg@in.ibm.com>
d570eb3 to
1fa9696
Compare
|
@majetideepak @czentgr : Please can you both take a look at this PR. It would be great to add the presto-native-tests module to the build. |
commit is unrelated here? |
@jaystarshot, this commit splits the testcases from |
aditi-pandit
left a comment
There was a problem hiding this comment.
Thanks @pramodsatya
| -Duser.timezone=America/Bahia_Banderas \ | ||
| -T1C | ||
|
|
||
| prestocpp-linux-presto-native-tests: |
There was a problem hiding this comment.
Too much code copying is happening with these test jobs (E22, sidecar plugin and now this one). We will refactor the test jobs after the merge and not make the refactor part of the PR.
Description
Introduces module
presto-native-teststo 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 product tests from
presto-testsmodule to use the native worker. For full context please refer to #23671.Contributor checklist