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
[SPARK-18872][SQL][TESTS] New test cases for EXISTS subquery (Joins + CTE) #16802
Conversation
Test build #72363 has started for PR 16802 at commit |
Retest this please |
Test build #72367 has finished for PR 16802 at commit
|
emp 3 300.0 | ||
emp 4 100.0 | ||
emp 5 1000.0 | ||
emp 6 - no dept 500.0 |
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.
I have verified the answer sets in this file match with the ones in DB2.
500 emp 5 2001-01-01 400.0 NULL | ||
600 emp 6 - no dept 2001-01-01 400.0 100 | ||
700 emp 7 2010-01-01 400.0 100 | ||
800 emp 8 2016-01-01 150.0 70 |
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.
I have verified the answer sets in this file match with the ones in DB2.
FROM dept | ||
WHERE dept_id >= 30 | ||
AND dept_id <= 50); | ||
|
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.
Hi, @dilipbiswal .
Can we have another test case, TC.02.05
, here for UNION
instead of UNION ALL
?
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.
@dongjoon-hyun Thanks !! I have added the UNION test case. I have also uploaded the updated db2 result file.
Test build #72415 has finished for PR 16802 at commit
|
cc @hvanhovell @gatorsmile |
LGTM - merging to master. |
@hvanhovell Thank you very much Herman !! |
… CTE) ## What changes were proposed in this pull request? This PR adds the third and final set of tests for EXISTS subquery. File name | Brief description ------------------------| ----------------- exists-cte.sql |Tests Exist subqueries referencing CTE exists-joins-and-set-ops.sql|Tests Exists subquery used in Joins (Both when joins occurs in outer and suquery blocks) DB2 results are attached here as reference : [exists-cte-db2.txt](https://github.com/apache/spark/files/752091/exists-cte-db2.txt) [exists-joins-and-set-ops-db2.txt](https://github.com/apache/spark/files/753283/exists-joins-and-set-ops-db2.txt) (updated) ## How was this patch tested? The test result is compared with the result run from another SQL engine (in this case is IBM DB2). If the result are equivalent, we assume the result is correct. Author: Dilip Biswal <dbiswal@us.ibm.com> Closes apache#16802 from dilipbiswal/exists-pr3.
…ll up to Optimizer phase ## What changes were proposed in this pull request? Currently Analyzer as part of ResolveSubquery, pulls up the correlated predicates to its originating SubqueryExpression. The subquery plan is then transformed to remove the correlated predicates after they are moved up to the outer plan. In this PR, the task of pulling up correlated predicates is deferred to Optimizer. This is the initial work that will allow us to support the form of correlated subqueries that we don't support today. The design document from nsyca can be found in the following link : [DesignDoc](https://docs.google.com/document/d/1QDZ8JwU63RwGFS6KVF54Rjj9ZJyK33d49ZWbjFBaIgU/edit#) The brief description of code changes (hopefully to aid with code review) can be be found in the following link: [CodeChanges](https://docs.google.com/document/d/18mqjhL9V1An-tNta7aVE13HkALRZ5GZ24AATA-Vqqf0/edit#) ## How was this patch tested? The test case PRs were submitted earlier using. [16337](#16337) [16759](#16759) [16841](#16841) [16915](#16915) [16798](#16798) [16712](#16712) [16710](#16710) [16760](#16760) [16802](#16802) Author: Dilip Biswal <dbiswal@us.ibm.com> Closes #16954 from dilipbiswal/SPARK-18874.
What changes were proposed in this pull request?
This PR adds the third and final set of tests for EXISTS subquery.
DB2 results are attached here as reference :
exists-cte-db2.txt
exists-joins-and-set-ops-db2.txt (updated)
How was this patch tested?
The test result is compared with the result run from another SQL engine (in this case is IBM DB2). If the result are equivalent, we assume the result is correct.