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

SQL should return more verbose and user-friendly error messages #275

Open
Yury-Fridlyand opened this issue Nov 9, 2021 · 0 comments
Open
Labels
enhancement New feature or request tdvt Tableau test framework

Comments

@Yury-Fridlyand
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Some queries use features that are not implemented or don't work properly. ClassCastException is a useless message for an end user.

curl -XPOST http://localhost:9200/_plugins/_sql -H 'Content-Type: application/json' -d '{"query": "SELECT 1>2 AS a FROM calcs GROUP BY a"}'
{
  "error": {
    "type": "ClassCastException",
    "reason": "There was internal problem at backend",
    "details": "class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader \u0027bootstrap\u0027)"
  },
  "status": 503
}
opensearchsql> SELECT 1>1 as a FROM `calcs` GROUP BY a;
TransportError(500, 'ClassCastException', {'error': {'type': 'ClassCastException', 'reason': 'There was internal problem at backend', 'details': "class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap')"}, 'status': 503})

Describe the solution you'd like
If a query refers to a not implemented or unsupported feature, so the reply should say about it.
If a query fails (assuming no errors in syntax), the error should report about it.

@Yury-Fridlyand Yury-Fridlyand added the enhancement New feature or request label Nov 9, 2021
@joshuali925 joshuali925 added the tdvt Tableau test framework label Nov 24, 2021
Yury-Fridlyand pushed a commit that referenced this issue Jun 14, 2023
Signed-off-by: Max Ksyunz <maxk@bitquilltech.com>
opensearch-trigger-bot bot pushed a commit that referenced this issue Jun 14, 2023
Signed-off-by: Max Ksyunz <maxk@bitquilltech.com>
(cherry picked from commit 29f99aa)
MaxKsyunz pushed a commit that referenced this issue Jun 15, 2023
Signed-off-by: Max Ksyunz <maxk@bitquilltech.com>
(cherry picked from commit 29f99aa)

Co-authored-by: Max Ksyunz <maxk@bitquilltech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tdvt Tableau test framework
Projects
None yet
Development

No branches or pull requests

2 participants