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

[YSQL] Support NULLS LAST option in SELECT query #1734

Closed
m-iancu opened this issue Jul 8, 2019 · 2 comments
Closed

[YSQL] Support NULLS LAST option in SELECT query #1734

m-iancu opened this issue Jul 8, 2019 · 2 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) integration/graphql/hasura Features related to running Hasura GraphQL on YugabyteDB
Milestone

Comments

@m-iancu
Copy link
Contributor

m-iancu commented Jul 8, 2019

No description provided.

@m-iancu m-iancu self-assigned this Jul 8, 2019
@kmuthukk kmuthukk added the area/ysql Yugabyte SQL (YSQL) label Jul 8, 2019
@m-iancu m-iancu added this to the v2.0 milestone Jul 9, 2019
@m-iancu m-iancu assigned jaki and unassigned m-iancu Jul 9, 2019
@m-iancu m-iancu added the integration/graphql/hasura Features related to running Hasura GraphQL on YugabyteDB label Jul 9, 2019
@mrpanda
Copy link
Contributor

mrpanda commented Jul 11, 2019

If this is going to be added, then can I request that the same capability is added to index creation as documented in https://www.postgresql.org/docs/11/indexes-ordering.html

Thanks

@ndeodhar
Copy link
Contributor

Hi @mrpanda, we are tracking the work for supporting NULLS LAST in index creation here: #1723. We created two separate issues because supporting it during index creation requires some additional work in DocDB layer whereas enabling it in SELECT is only a grammar change.

We are actively working on both these and hope to have these available in the next couple of weeks.

jaki pushed a commit that referenced this issue Jul 23, 2019
Summary:
Support SELECT ... NULLS LAST option

* Move `parser_ybc_not_supported` up from `opt_nulls_order` to
  `yb_index_elem` in order to support `SELECT` statement but still not
  support `CREATE INDEX` statements.

Fix typos and add final newline

* Change "CREATE INDEX NULL LAST" to "CREATE INDEX NULLS LAST".  Add
  newline to the end of the file.

Change CREATE INDEX NULLS LAST to NULLS LAST

* Change the not supported error message to be more generic because it may be
  triggered even in a SELECT statement with primary key.

Add ORDER BY tests to yb_select.sql

* Copy over the ORDER BY tests from `sql/select.sql` to `sql/yb_select.sql`
  because SELECT NULLS LAST is now supported.  Update `expected/yb_select.out`
  accordingly.

Test Plan:
* Jenkins
* `TestPgRegressPgMisc`, particularly `yb_select`

Reviewers: mihnea, neha

Reviewed By: mihnea, neha

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D6877
@jaki jaki closed this as completed Jul 23, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) integration/graphql/hasura Features related to running Hasura GraphQL on YugabyteDB
Projects
None yet
Development

No branches or pull requests

5 participants