github-actions[bot] commented on code in PR #65984:
URL: https://github.com/apache/doris/pull/65984#discussion_r3643018057
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java:
##########
@@ -924,8 +924,14 @@ private Table getProcessedTable() throws UserException {
}
if (theScanParams != null && theScanParams.incrementalRead()) {
+ // System table handles are cached, so preserve query isolation by
applying dynamic
+ // options to a copied Paimon table instead of changing the shared
handle.
return baseTable.copy(getIncrReadParams());
}
+ if (theScanParams != null && theScanParams.isOptions()) {
+ // Apply per-query options to a copy so they cannot leak through
cached table handles.
Review Comment:
[P1] Bind the schema selected by snapshot options
`Table.copy` can change the row type here: in Paimon 1.3.1,
`scan.snapshot-id` resolves the target snapshot's `schemaId`, and data system
tables such as `audit_log` derive their row type from that copied table. Doris
has already cached the latest system-table columns and converted predicates
against the latest row type, though. After schema evolution, a query for an
older snapshot can therefore have latest-only projections silently filtered at
lines 610-614 and latest field indexes passed to a different historical schema.
Serializing this processed table (the subject of the existing thread) does not
fix that mismatch. Please resolve schema-changing options before
relation/predicate binding, or reject them for schema-dependent system tables,
and cover an evolved-schema snapshot.
--
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]