timveil opened a new issue, #11823:
URL: https://github.com/apache/pinot/issues/11823

   When submitting the following query using JDBC an `ERROR` occurs and is 
logged but ultimately does not prevent the query from  completing.
   
   the query...
   ```
   SELECT stats.* FROM airlineStats stats limit 10
   ```
   the client side logs...
   ```
   2023-10-17T11:29:19.472-04:00 ERROR 76108 --- [           main] 
org.apache.pinot.client.Connection       : Cannot parse table name from query: 
SET useMultistageEngine=true;
   SELECT stats.* FROM airlineStats stats limit 10. Fallback to broker selector 
default.
   
   java.lang.ClassCastException: class org.apache.calcite.sql.SqlIdentifier 
cannot be cast to class org.apache.calcite.sql.SqlSelect 
(org.apache.calcite.sql.SqlIdentifier and org.apache.calcite.sql.SqlSelect are 
in unnamed module of loader 'app')
        at 
org.apache.pinot.sql.parsers.CalciteSqlParser.compileSqlNodeToPinotQuery(CalciteSqlParser.java:436)
 ~[pinot-jdbc-uber-jar-1.1.0-SNAPSHOT.jar:na]
        at 
org.apache.pinot.sql.parsers.CalciteSqlParser.compileToDataSource(CalciteSqlParser.java:498)
 ~[pinot-jdbc-uber-jar-1.1.0-SNAPSHOT.jar:na]
        at 
org.apache.pinot.sql.parsers.CalciteSqlParser.compileSqlNodeToPinotQuery(CalciteSqlParser.java:453)
 ~[pinot-jdbc-uber-jar-1.1.0-SNAPSHOT.jar:na]
        at 
org.apache.pinot.client.Connection.resolveTableName(Connection.java:146) 
~[pinot-jdbc-uber-jar-1.1.0-SNAPSHOT.jar:na]
        at org.apache.pinot.client.Connection.execute(Connection.java:96) 
~[pinot-jdbc-uber-jar-1.1.0-SNAPSHOT.jar:na]
        at org.apache.pinot.client.Connection.execute(Connection.java:83) 
~[pinot-jdbc-uber-jar-1.1.0-SNAPSHOT.jar:na]
        at 
org.apache.pinot.client.PinotStatement.executeQuery(PinotStatement.java:67) 
~[pinot-jdbc-uber-jar-1.1.0-SNAPSHOT.jar:na]
   ```
   
   because the method `Connection.resolveTableName` catches/logs this 
exception, the code executes the query fine using the multi-stage engine.  In 
practice this may result in performance problems because the code is not able 
to identify the correct broker.  
   
   It seems that either `Connection.resolveTableName` and corresponding method 
calls need to be reworked to support queries the multi-stage engine supports or 
this method call should be avoided. 


-- 
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