Skip to content
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

Enhance YCQL grammar to support interchanging order of LIMIT and OFFSET clause. #349

Closed
pritamdamania87 opened this issue Jun 30, 2018 · 1 comment
Labels
kind/enhancement This is an enhancement of an existing feature

Comments

@pritamdamania87
Copy link
Contributor

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.

@rao-vasireddy rao-vasireddy added the kind/enhancement This is an enhancement of an existing feature label Jul 2, 2018
yugabyte-ci pushed a commit that referenced this issue Jul 6, 2018
…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
@rao-vasireddy
Copy link
Contributor

This was done in the commit a3598ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement This is an enhancement of an existing feature
Projects
Archived in project
Development

No branches or pull requests

2 participants