yashmayya opened a new pull request, #13554:
URL: https://github.com/apache/pinot/pull/13554

   - Currently, if a user tries to run a v2 query using the broker query API, 
the error returned is not very clear and new users won't really know what to do 
next. For instance, executing a query with a CTE returns an error like:
   ```
   SQLParsingError: java.lang.ClassCastException: class 
org.apache.calcite.sql.SqlWith cannot be cast to class 
org.apache.calcite.sql.SqlSelect (org.apache.calcite.sql.SqlWith and 
org.apache.calcite.sql.SqlSelect are in unnamed module of loader 'app') at 
org.apache.pinot.sql.parsers.CalciteSqlParser.compileSqlNodeToPinotQuery(CalciteSqlParser.java:434)
 at 
org.apache.pinot.sql.parsers.CalciteSqlParser.compileToPinotQuery(CalciteSqlParser.java:166)
 at 
org.apache.pinot.broker.requesthandler.BaseSingleStageBrokerRequestHandler.handleRequest(BaseSingleStageBrokerRequestHandler.java:256)
 at 
org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler.handleRequest(BaseBrokerRequestHandler.java:133)
   ```
   - Earlier, an improvement was made to return a more helpful error message in 
such scenarios but only for the controller SQL API - 
https://github.com/apache/pinot/pull/11451.
   - This patch does some refactoring so that we also return a helpful error 
message in such scenarios with the broker query API. The error message has also 
been tweaked slightly since even the controller SQL API can technically be 
called via any REST client and not necessarily only the web based query console.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to