wuwenchi commented on code in PR #34681:
URL: https://github.com/apache/doris/pull/34681#discussion_r1604433431


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java:
##########
@@ -273,6 +273,7 @@ private LogicalPlan getLogicalPlan(TableIf table, 
UnboundRelation unboundRelatio
                         return new LogicalSubQueryAlias<>(tableQualifier, 
hiveViewPlan);
                     }
                     hmsTable.setScanParams(unboundRelation.getScanParams());
+                    
hmsTable.setTableSnapshotVersion(unboundRelation.getTableSnapshot().orElse(null));

Review Comment:
   Only HMS tables are supported, but can other types of iceberg tables be 
supported at the same time?



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -966,6 +966,11 @@ sampleMethod
     | INTEGER_VALUE ROWS                                            
#sampleByRows
     ;
 
+tableSnapshot
+    : FOR VERSION AS OF version=number

Review Comment:
   The range of `number` is relatively wide, and we can use `INTEGER_VALUE`



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java:
##########
@@ -169,6 +170,7 @@ public class HMSExternalTable extends ExternalTable 
implements MTMVRelatedTableI
     // for hudi incremental read
     private TableScanParams scanParams = null;
     private IncrementalRelation incrementalRelation = null;
+    private TableSnapshot tableSnapshot = null;

Review Comment:
   Can we get snapshot version information directly from IcebergScanNode? 
   1. This naturally supports all types of iceberg tables. 
   2. Specify that the snapshot belongs to the query, and its valid range is 
related to the query, so it is not appropriate to put this information in the 
HMSExternalTable.



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to