github-actions[bot] commented on code in PR #63406:
URL: https://github.com/apache/doris/pull/63406#discussion_r3295589149
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonExternalTable.java:
##########
@@ -97,13 +97,7 @@ protected synchronized void makeSureInitialized() {
}
public Table getPaimonTable(Optional<MvccSnapshot> snapshot) {
- if (snapshot.isPresent()) {
- // MTMV scenario: get from snapshot cache
- return
getOrFetchSnapshotCacheValue(snapshot).getSnapshot().getTable();
- } else {
- // Normal query scenario: get directly from table cache
- return PaimonUtils.getPaimonTable(this);
- }
+ return getOrFetchSnapshotCacheValue(snapshot).getSnapshot().getTable();
Review Comment:
This now returns a snapshot-pinned table even when the current query uses
Paimon incremental scan params. `StatementContext.loadSnapshots(...,
scanParams)` calls `loadSnapshot`, but `getPaimonSnapshotCacheValue` only
special-cases table snapshots, tags, and branches; for
`scanParams.incrementalRead()` it falls through to
`getLatestSnapshotCacheValue`, whose table already has `scan.snapshot-id` set.
Later `PaimonScanNode.getProcessedTable()` applies `incremental-between` /
`incremental-between-timestamp` by copying options onto this `baseTable`. That
means an incremental query can carry both the pinned latest snapshot option and
the incremental options, so the requested incremental range can be ignored or
rejected by Paimon. Please keep incremental-read handles unpinned, or make
`loadSnapshot`/`getPaimonTable` distinguish incremental scan params before
returning a latest-snapshot table.
--
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]