You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "tibrewalpratik17 (via GitHub)" <gi...@apache.org> on 2023/03/30 08:50:52 UTC

[GitHub] [pinot] tibrewalpratik17 commented on a diff in pull request #10505: [Multistage] Pushdown explain queries from controller to broker

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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org