You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…and LIMIT clauses.
Summary:
We currently only support LIMIT and OFFSET clauses in the order `LIMIT x OFFSET y`.
Postgresql supports `OFFSET x LIMIT y` in addition to the order mentioned above. I've enhanced our
YCQL grammar to ensure we support the OFFSET and LIMIT clauses in either order. In addition to that
I've added a few tests for invalid offset values.
Test Plan: unit tests.
Reviewers: mihnea, kannan, robert
Reviewed By: robert
Subscribers: yql
Differential Revision: https://phabricator.dev.yugabyte.com/D5085
We currently strictly require that the OFFSET clause follows the LIMIT clause. As a result statements like
OFFSET x LIMIT y
are not allowed. Although, it looks like postgresql supports both variants: https://github.com/postgres/postgres/blob/master/src/backend/parser/gram.y#L11548.We should follow suit and support both variations as well.
The text was updated successfully, but these errors were encountered: