abstractdog commented on code in PR #5613:
URL: https://github.com/apache/hive/pull/5613#discussion_r1923583067


##########
ql/src/java/org/apache/hadoop/hive/ql/QueryProperties.java:
##########
@@ -355,6 +376,16 @@ public void clear() {
 
     multiDestQuery = false;
     filterWithSubQuery = false;
+
+    tablesQueried.clear();
   }
 
+  /**
+   * This method extracts all query related information from the root QB from 
its state available after semantic
+   * analysis.
+   * @param qb the root QB of the analyzer
+   */
+  public void extractInfoFromQueryBlock(QB qb) {
+    qb.iterate(qbIt -> tablesQueried.addAll(qbIt.getTableAliasValues()));

Review Comment:
   it supposed to, let me check and add unit test



##########
ql/src/java/org/apache/hadoop/hive/ql/QueryProperties.java:
##########
@@ -355,6 +376,16 @@ public void clear() {
 
     multiDestQuery = false;
     filterWithSubQuery = false;
+
+    tablesQueried.clear();
   }
 
+  /**
+   * This method extracts all query related information from the root QB from 
its state available after semantic
+   * analysis.
+   * @param qb the root QB of the analyzer
+   */
+  public void extractInfoFromQueryBlock(QB qb) {
+    qb.iterate(qbIt -> tablesQueried.addAll(qbIt.getTableAliasValues()));

Review Comment:
   it is supposed to, let me check and add unit test



-- 
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: gitbox-unsubscr...@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to