kasakrisz commented on a change in pull request #2756:
URL: https://github.com/apache/hive/pull/2756#discussion_r751148742



##########
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:
       Refactored how `SourceTable` instances are created and in some cases 
like the one you mentioned `TableName` is a better choice because the stats 
contained by `SourceTable` is not needed here.
   Added factory methods to `ql.metadata.Table`
   * `SourceTable createSourceTable()` - to create a `SourceTable` instance in 
an initial state referencing this table instance.
   * `TableName getFullTableName()` - to create a `TableName` using this table 
instance.




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