abhioncbr commented on code in PR #10873:
URL: https://github.com/apache/pinot/pull/10873#discussion_r1235478235


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java:
##########
@@ -185,8 +190,10 @@ private String getMultiStageQueryResponse(String query, 
String queryOptions, Htt
       return QueryException.ACCESS_DENIED_ERROR.toString();
     }
 
-    SqlNodeAndOptions sqlNodeAndOptions = RequestUtils.parseQuery(query);
-    List<String> tableNames = 
CalciteSqlParser.extractTableNamesFromNode(sqlNodeAndOptions.getSqlNode());

Review Comment:
   Yes, I agree `CalciteSqlParser.extractTableNamesFromNode` is quite hacky, 
and we often get exceptions related to it. 
   I think, for now, we can go with the first approach you have mentioned 
(blindly selecting a broker) and later figure out the long-term approach.
   
   Honestly, as for the second approach, I am not sure yet. I have to look into 
it. Also, I don't mind rewriting the hacky code in a better way(if possible) or 
using some static method from the Caclite(needs exploration).



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