Gabriel39 commented on code in PR #66297:
URL: https://github.com/apache/doris/pull/66297#discussion_r3698076131


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/paimon/PaimonLatestSnapshotProjectionLoader.java:
##########
@@ -79,8 +125,17 @@ private PaimonSnapshot resolveLatestSnapshot(Table 
paimonTable) {
             // Pin the data snapshot for MVCC while retaining the latest table 
schema. A normal
             // copy applies time travel and falls back to the snapshot's 
schema, which can be stale
             // immediately after a schema change that has not produced a new 
data snapshot.
-            snapshotTable = latestSchemaTable.copyWithoutTimeTravel(
-                    
Collections.singletonMap(CoreOptions.SCAN_SNAPSHOT_ID.key(), 
String.valueOf(latestSnapshotId)));
+            Map<String, String> projectionOptions = 
PaimonReaderOptions.runtimeSafeCopyOptions(

Review Comment:
   Fixed. Lightweight fence construction now captures snapshot identity without 
prematurely validating physical reader options, while the composed relation 
projection performs normalization. The physical-zero/relation-one path is 
covered.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/paimon/PaimonLatestSnapshotProjectionLoader.java:
##########
@@ -79,8 +124,10 @@ private PaimonSnapshot resolveLatestSnapshot(Table 
paimonTable) {
             // Pin the data snapshot for MVCC while retaining the latest table 
schema. A normal
             // copy applies time travel and falls back to the snapshot's 
schema, which can be stale
             // immediately after a schema change that has not produced a new 
data snapshot.
+            // The lightweight fence must not validate physical planning 
options before relation
+            // overrides are composed; validation belongs to 
loadEffectiveAtFence's final copy.
             snapshotTable = latestSchemaTable.copyWithoutTimeTravel(
-                    
Collections.singletonMap(CoreOptions.SCAN_SNAPSHOT_ID.key(), 
String.valueOf(latestSnapshotId)));
+                    PaimonScanParams.isolateSnapshotRead(latestSnapshotId));

Review Comment:
   Fixed. Full latest projection remains runtime-capped before partition 
enumeration, while only the lightweight statement fence stays neutral. The 
partitioned smaller-FE regression is included.



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