zabetak commented on code in PR #5798:
URL: https://github.com/apache/hive/pull/5798#discussion_r2081360327


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java:
##########
@@ -1364,4 +1364,8 @@ public SourceTable createSourceTable() {
     sourceTable.setDeletedCount(0L);
     return sourceTable;
   }
+  
+  public boolean isNative() {
+    return !isNonNative();
+  }

Review Comment:
   nit: the method is trivial; I guess we can leave without it.



##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -12193,6 +12188,22 @@ samplePredicate, true, new 
SampleDesc(ts.getNumerator(),
     return output;
   }
 
+  public List<VirtualColumn> getVirtualColumns(Table tab) {
+    List<VirtualColumn> virtualColumns = new ArrayList<>();
+    if (tab.isNative()) {
+      virtualColumns.addAll(VirtualColumn.getRegistry(conf));
+    }
+    if (tab.isNonNative() && AcidUtils.isNonNativeAcidTable(tab)) {
+      virtualColumns.addAll(tab.getStorageHandler().acidVirtualColumns());
+    }
+    if (tab.isNonNative() && tab.getStorageHandler().areSnapshotsSupported() &&
+        isBlank(tab.getMetaTable())) {
+      virtualColumns.add(VirtualColumn.SNAPSHOT_ID);
+    }
+    
+    return virtualColumns;
+  }
+

Review Comment:
   nit: I like the refactoring although I feel that the method may have better 
encapsulation if moved inside `Table`.



##########
iceberg/iceberg-handler/src/test/queries/positive/iceberg_multiple_lateral_views.q:
##########
@@ -0,0 +1,7 @@
+

Review Comment:
   nit: redundant empty line



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