tibrewalpratik17 commented on code in PR #10505:
URL: https://github.com/apache/pinot/pull/10505#discussion_r1152941722


##########
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java:
##########
@@ -174,6 +174,9 @@ public static List<String> 
extractTableNamesFromNode(SqlNode sqlNode) {
       }
       tableNames.addAll(extractTableNamesFromNode(((SqlWith) sqlNode).body));
       tableNames.removeAll(aliases);
+    } else if (sqlNode instanceof SqlExplain) {
+      SqlExplain explain = (SqlExplain) sqlNode;
+      tableNames.addAll(extractTableNamesFromNode(explain.getExplicandum()));

Review Comment:
   This was a miss in the previous PR. In case of multistage queries via 
controller, we extract the table name from the query to see all the tables are 
in the same tenant or not. In case of `explain plan for ...` queries, we missed 
out on extracting name in the parser. Added it here in this patch.



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