Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

New engine: Sort order keyword ASC/DESC is case sensitive #852

Closed
chloe-zh opened this issue Nov 24, 2020 · 0 comments
Closed

New engine: Sort order keyword ASC/DESC is case sensitive #852

chloe-zh opened this issue Nov 24, 2020 · 0 comments
Labels

Comments

@chloe-zh
Copy link
Member

Sort order ASC/DESC works well when the keyword ASC/DESC is in upper case, but it is not recognized if using lower case, for example:

POST _opendistro/_sql
{
  "query": "select age from accounts order by age desc"
}

{
  "error": {
    "reason": "Invalid SQL query",
    "details": "No enum constant com.amazon.opendistroforelasticsearch.sql.ast.tree.Sort.SortOrder.desc",
    "type": "IllegalArgumentException"
  },
  "status": 400
}

expected output:

{
  "schema": [
    {
      "name": "age",
      "type": "long"
    }
  ],
  "datarows": [
    [
      36
    ],
    [
      33
    ],
    [
      32
    ],
    [
      28
    ]
  ],
  "total": 4,
  "size": 4
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants