kriti-sc commented on a change in pull request #7894:
URL: https://github.com/apache/pinot/pull/7894#discussion_r770307351



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
##########
@@ -122,6 +122,7 @@ public static PinotQuery compileToPinotQuery(String sql)
 
     // Extract OPTION statements from sql as Calcite Parser doesn't parse it.
     List<String> options = extractOptionsFromSql(sql);
+    sql = removeCommentedOptionsFromSql(sql);

Review comment:
       It is not wise to remove the commented part from the sql because it may 
distort the query. Ex: 
   `SELECT * FROM tableA where colA LIKE '%--%'` becomes `SELECT * FROM tableA 
where colA LIKE '%%'`
   
   But this is the change I have made – The first thing that will happen is the 
removal of commented options. After this, query parsing will proceed like 
before. 




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

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