ege-st opened a new issue, #10921:
URL: https://github.com/apache/pinot/issues/10921

   Syntax error messages are very hard to read. Usually, they are just stack 
traces from Calcite along with an HTTP Code 200. This creates a very confusing 
message for users: a stack trace tells the user that the database itself has 
faulted but the 200 code says that everything is fine. Compounding the problem 
is that the stack trace is the same across all syntax error messages; 
therefore, it does not provide any information on what the syntax problem is or 
how to fix it.
   
   The result is a poor user experience for a person trying to learn how to use 
Pinot and for experienced people writing complex queries.
   
   The goal for this ticket is to have Pinot return human readable error 
messages for syntax problems.
   
   ### Example
   This query `select * from mytable WHEE ActualElapsedTime = 100` returns this 
error:
   
   ```
   SQLParsingError:
   java.lang.Exception: Unable to parse the SQL: 'select * from mytable WHEE 
ActualElapsedTime = 100'
        at 
org.apache.pinot.controller.api.resources.PinotQueryResource.executeSqlQuery(PinotQueryResource.java:144)
        at 
org.apache.pinot.controller.api.resources.PinotQueryResource.handlePostSql(PinotQueryResource.java:110)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   ```
   
   It should return something which states that `WHEE` is invalid like `Invalid 
keyword: 'WHEE'` or `Expected 'WHERE' but found 'WHEE'`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to