You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/11/12 16:57:56 UTC

[GitHub] [hive] scarlin-cloudera commented on a change in pull request #2756: HIVE-25656: Get materialized view state based on number of affected rows of transactions

scarlin-cloudera commented on a change in pull request #2756:
URL: https://github.com/apache/hive/pull/2756#discussion_r748443946



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -12847,13 +12849,21 @@ protected void saveViewDefinition() throws SemanticException {
     createVwDesc.setViewExpandedText(expandedText);
   }
 
-  private Set<String> getTablesUsed(ParseContext parseCtx) {
-    Set<String> tablesUsed = new HashSet<>();
+  private Set<SourceTable> getTablesUsed(ParseContext parseCtx) {
+    Set<SourceTable> tablesUsed = new HashSet<>();
     for (TableScanOperator topOp : parseCtx.getTopOps().values()) {
       Table table = topOp.getConf().getTableMetadata();
       if (!table.isMaterializedTable() && !table.isView()) {
         // Add to signature
-        tablesUsed.add(table.getFullyQualifiedName());
+        SourceTable sourceTable = new SourceTable();

Review comment:
       So I know the SourceTable file is a generated thrift file but it seems like we have soooo much code in SemanticAnalyzer and this code seems like it belongs in a different method somewhere.  Some kind of creator method that takes a Table as a parameter.   Maybe somewhere under standalone-metastore in a Factory class?  If we put it in there, we'd also have to pass in a boolean because standalone-metastore should not rely on AcidUtils




-- 
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-unsubscribe@hive.apache.org

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



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