-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-20719] [SQL] Support LIMIT ALL #17960
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
|
Test build #76847 has started for PR 17960 at commit |
| select * from testdata limit 2; | ||
| select * from arraydata limit 2; | ||
| select * from mapdata limit 2; | ||
| SELECT * FROM testdata LIMIT 2; |
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 just wonder why these should be upper-cased just for curiosity. Is this way preferred?
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.
Yes. This is preferred. All the SQL keywords are preferred to use the upper case.
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 see. Thank you.
| }.getMessage | ||
| assert(e.contains(expected)) | ||
| } | ||
|
|
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 see. This was duplicated.
|
Retest this please. |
|
+1, LGTM. |
|
Test build #76873 has finished for PR 17960 at commit
|
| withWindow.optional(limit) { | ||
| Limit(typedVisit(limit), withWindow) | ||
| if (ALL != null) { | ||
| // LIMIT ALL is the same as omitting the LIMIT clause |
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 be true? I don't think you need to check ALL if limit != null
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.
Sure. Thank you!
|
Test build #76881 has finished for PR 17960 at commit
|
|
LGTM - merging to master. Thanks! |
### What changes were proposed in this pull request? `LIMIT ALL` is the same as omitting the `LIMIT` clause. It is supported by both PrestgreSQL and Presto. This PR is to support it by adding it in the parser. ### How was this patch tested? Added a test case Author: Xiao Li <[email protected]> Closes apache#17960 from gatorsmile/LimitAll.
### What changes were proposed in this pull request? `LIMIT ALL` is the same as omitting the `LIMIT` clause. It is supported by both PrestgreSQL and Presto. This PR is to support it by adding it in the parser. ### How was this patch tested? Added a test case Author: Xiao Li <[email protected]> Closes apache#17960 from gatorsmile/LimitAll.
What changes were proposed in this pull request?
LIMIT ALLis the same as omitting theLIMITclause. It is supported by both PrestgreSQL and Presto. This PR is to support it by adding it in the parser.How was this patch tested?
Added a test case