Gabriel39 commented on code in PR #66247:
URL: https://github.com/apache/doris/pull/66247#discussion_r3689764112
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/StatementContext.java:
##########
@@ -1047,8 +1049,28 @@ public void loadSnapshots(TableIf specificTable,
Optional<TableSnapshot> tableSn
MvccTableInfo mvccTableInfo = new MvccTableInfo(specificTable,
versionKeyOf(tableSnapshot, scanParams));
if (!snapshots.containsKey(mvccTableInfo)) {
- snapshots.put(mvccTableInfo,
- ((MvccTable)
specificTable).loadSnapshot(tableSnapshot, scanParams));
+ MvccTable mvccTable = (MvccTable) specificTable;
+ MvccSnapshot snapshot;
+ if (mvccTable.requiresLatestSnapshotFence(tableSnapshot,
scanParams)) {
+ MvccTableInfo latestKey = new MvccTableInfo(specificTable);
+ MvccSnapshot latestFence =
latestSnapshots.computeIfAbsent(latestKey,
Review Comment:
Fixed in 068ee111cd0. setSnapshot now seeds the latest-snapshot map as the
statement fence, so option projections reuse the MTMV-injected version instead
of performing a newer live lookup. The new seeded-fence test covers both alias
orders.
--
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]