fx19880617 commented on a change in pull request #5513:
URL: https://github.com/apache/incubator-pinot/pull/5513#discussion_r437772483



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
##########
@@ -278,7 +278,9 @@ private static PinotQuery 
compileCalciteSqlToPinotQuery(String sql) {
           pinotQuery.setOffset(Integer.valueOf(((SqlNumericLiteral) 
selectSqlNode.getOffset()).toValue()));
         }
         DataSource dataSource = new DataSource();
-        dataSource.setTableName(selectSqlNode.getFrom().toString());
+        if (selectSqlNode.getFrom() != null) {

Review comment:
       `SELECT *` is not valid as * is parsed as an identifier.
   
   if you do `SELECT '*'` then it's a valid as you are querying for a string 
literal `*`
   
   See this test:
   
https://github.com/apache/incubator-pinot/pull/5513/files#diff-b1b494630a336fd5454600f3bcd0973dR52




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

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