-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-28034][SQL][TEST] Port with.sql #24860
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
Conversation
|
This is a work in progress PR as currently almost nothing can be ported and most of the I left a lot of TODOs in the PR and will try to clean them up next week. |
40bc3f0 to
fd8abe0
Compare
|
@dongjoon-hyun, @gatorsmile, @wangyum I finished the analysis of I have a PR open to address |
|
ok to test |
|
Test build #106939 has finished for PR 24860 at commit
|
|
Test build #107009 has finished for PR 24860 at commit
|
|
Retest this please. |
sql/core/src/test/resources/sql-tests/results/pgSQL/with.sql.out
Outdated
Show resolved
Hide resolved
|
Test build #107214 has finished for PR 24860 at commit
|
|
Test build #107235 has finished for PR 24860 at commit
|
|
Since #25054 is merged, could you regenerate the result once more? |
Sure, done. |
|
Test build #107271 has finished for PR 24860 at commit
|
|
I still left 4 TODOs in the file, could you please help me @dongjoon-hyun what to do with these?
Also please check the notes in the PR description. I left these notes in the ported SQL file where I though it makes no sense to create a ticket. |
|
Spark had Views-to-DDL before, but it's removed. IIRC, there is a ticket. If you search, you can find the deletion ticket. |
|
Test build #107345 has finished for PR 24860 at commit
|
Oh, it seems |
|
Test build #107351 has finished for PR 24860 at commit
|
|
Retest this please. |
|
So, the remaining things looks like cleaning up the |
Yes, and actually the only remaining question is if |
|
|
Thanks! Does that mean that we should turn on |
|
Please wrap those create statements with |
|
|
||
| == SQL == | ||
| create table foo (with baz) | ||
| -----------------------^^^ |
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.
With set spark.sql.parser.ansi.enabled=true, this will raise the following instead of DataType baz is not supported error.
Error in query:
no viable alternative at input 'with'(line 1, pos 18)
== SQL ==
create table foo (with baz)
------------------^^^
|
Test build #107472 has finished for PR 24860 at commit
|
|
@maropu . Could you file a JIRA for that
|
|
|
|
Test build #107515 has finished for PR 24860 at commit
|
|
retest this please |
|
Test build #107520 has finished for PR 24860 at commit
|
|
Hi, @maropu and @wangyum , and @peter-toth .
|
dongjoon-hyun
left a comment
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.
+1, LGTM. Merged to master.
|
Thanks @dongjoon-hyun, @maropu for the review! |
## What changes were proposed in this pull request? This PR is to port with.sql from PostgreSQL regression tests. https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/with.sql The expected results can be found in the link: https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/expected/with.out When porting the test cases, found 7 PostgreSQL specific features that do not exist in Spark SQL: - [SPARK-19799](https://issues.apache.org/jira/browse/SPARK-19799) Support WITH clause in subqueries - [SPARK-24497](https://issues.apache.org/jira/browse/SPARK-24497) Support recursive SQL query - [SPARK-28297](https://issues.apache.org/jira/browse/SPARK-28297) Handling outer links in CTE subquery expressions - [SPARK-28296](https://issues.apache.org/jira/browse/SPARK-28296) Improved VALUES support - [SPARK-28146](https://issues.apache.org/jira/browse/SPARK-28146) Support IS OF type predicate - [SPARK-28147](https://issues.apache.org/jira/browse/SPARK-28147) Support RETURNING clause - [SPARK-27878](https://issues.apache.org/jira/browse/SPARK-27878) Support ARRAY(sub-SELECT) expressions Also, found one inconsistent behavior: - [SPARK-28299](https://issues.apache.org/jira/browse/SPARK-28299) Evaluation of multiple CTE uses Also, added the following notes: - Spark SQL doesn't support DELETE statement - Spark SQL doesn't support UPDATE statement - Spark SQL doesn't support RULEs - Spark SQL doesn't support UNIQUE constraints - Spark SQL doesn't support ON CONFLICT clause - Spark SQL doesn't support TRIGGERs - Spark SQL doesn't support INHERITS clause ## How was this patch tested? N/A Closes apache#24860 from peter-toth/SPARK-28034. Authored-by: Peter Toth <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
This PR is to port with.sql from PostgreSQL regression tests. https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/with.sql
The expected results can be found in the link: https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/expected/with.out
When porting the test cases, found 7 PostgreSQL specific features that do not exist in Spark SQL:
Also, found one inconsistent behavior:
Also, added the following notes:
How was this patch tested?
N/A