github-actions[bot] commented on code in PR #66530:
URL: https://github.com/apache/doris/pull/66530#discussion_r4056159231
##########
fe/fe-connector/fe-connector-paimon/src/main/java/org/apache/doris/connector/paimon/PaimonScanPlanProvider.java:
##########
@@ -1040,7 +1116,13 @@ public Map<String, String> getScanNodeProperties(
Optional<ConnectorExpression> filter) {
PaimonTableHandle paimonHandle = (PaimonTableHandle) handle;
- Table table = resolveScanTable(paimonHandle);
+ // When statement-scoped reuse is active, planScan may have already
resolved this table
+ // and cached it at the scope. Use the SAME cached instance so the
serialized table,
+ // schema dictionary, and partition keys all reflect the same
generation the scan plan
+ // was built against. Without this, a no-cache catalog can give
getScanNodeProperties a
+ // different generation than planScan used, pairing generation-A
ranges with generation-B
+ // serialized table / projection schema / schema dictionary.
+ Table table = resolveScanTableConsistent(session, paimonHandle);
Review Comment:
[P1] Keep system-table properties on the same physical generation as their
splits. `planScan` deliberately bypasses reuse for system tables, so an equal
alias B plans ranges from its own generation, but this memo can return alias
A's wrapper. The memo stores only `Table`; downstream `tableForBackend`,
manifest-cap handling, and `$ro` schema resolution still read B's handle-owned
`sysBaseTable`/`systemTableSource`. After a no-cache refresh or schema change,
the node can therefore derive partition keys, predicate row types, or vended
state from A while serializing/planning B, causing misbound predicates or
wrong/null columns. This is a residual distinct from r4023299617:
system/branch/options now participate in the key, but the physical source pair
does not. Please either bypass this memo for system-table properties just as
range planning does, or cache one holder containing the wrapper and its exact
source pair and consume it on both paths; cover two equal `$ro` aliases backed
by g
enerations A and B.
--
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]