-
Notifications
You must be signed in to change notification settings - Fork 61
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
Partiql eval limit offset #1371
Conversation
Conformance comparison report-Cross Engine
Number failing in both: 432 Number passing in eval engine but fail in legacy engine: 6 Number failing in eval engine but pass in legacy engine: 2152 Click here to see
Conformance comparison report-Cross Commit-EVAL
Number failing in both: 2559 Number passing in Base (339bd05) but now fail: 25 Number failing in Base (339bd05) but now pass: 27 Conformance comparison report-Cross Commit-LEGACY
Number failing in both: 438 Number passing in Base (339bd05) but now fail: 0 Number failing in Base (339bd05) but now pass: 0 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## partiql-eval #1371 +/- ##
===============================================
Coverage ? 50.32%
Complexity ? 1045
===============================================
Files ? 165
Lines ? 13129
Branches ? 2452
===============================================
Hits ? 6607
Misses ? 5862
Partials ? 660
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
limit::{ | ||
input: rel, | ||
limit: rex, | ||
}, | ||
|
||
offset::{ | ||
input: rel, | ||
offset: rex, | ||
}, |
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.
LIMIT NULL is not the same as LIMIT 0.
I had originally modeled LIMIT..OFFSET as the FETCH operator, because FETCH is defined in the SQL specification whereas LIMIT and OFFSET are not actually defined the SQL spec (92 or 99).
However, PartiQL allows for OFFSET without LIMIT hence why I split them into their own operators. I don't think we should consolidate, but if that is agreed to be better then it should at least be called FETCH
9eb595b
to
9dd2b6c
Compare
Relevant Issues
Description
If limit is 0 or null, the query should behavior as the same as if there were no limit clause.If offset is 0 or null, the query should behavior as the same as if there were no offset clause.
If limit and offset clause both exist, the offset should get executed first.
Update:
When converting from AST to Plan, append the offset node first then the limit node.
Other Information
Updated Unreleased Section in CHANGELOG: [YES/NO]
Any backward-incompatible changes? [YES/NO]
errors for users that are using our public APIs or the entities that have
public
visibility in our code-base. >Any new external dependencies? [YES/NO]
Do your changes comply with the Contributing Guidelines
and Code Style Guidelines? [YES/NO]
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.