github-actions[bot] commented on code in PR #68161:
URL: https://github.com/apache/doris/pull/68161#discussion_r4082422474
##########
fe/fe-connector/fe-connector-paimon/src/main/java/org/apache/doris/connector/paimon/PaimonScanPlanProvider.java:
##########
@@ -708,7 +708,10 @@ private List<ConnectorScanRange> planScanInternal(
// Build predicates from filter expression
RowType rowType = table.rowType();
List<org.apache.paimon.predicate.Predicate> predicates =
Collections.emptyList();
- if (filter.isPresent()) {
+ // Paimon can cast historical timestamp statistics with the current
precision while planning
+ // splits. Keep these predicates as Doris residuals so an old file
cannot be pruned before JNI
+ // widens and repairs its timestamp values.
+ if (filter.isPresent() && !containsTimestampType(rowType)) {
PaimonPredicateConverter converter = new
PaimonPredicateConverter(rowType);
predicates = converter.convert(filter.get());
Review Comment:
[P1] Preserve independent non-timestamp predicates
This checks the entire table schema, so a table `(dt DATE, id INT, ts
TIMESTAMP)` queried with `WHERE dt = ...` or `id = 7` sends no filter to
`newScan().plan().splits()` solely because `ts` exists. Paimon partition/file
pruning is predicate-driven here, so every such selective query must enumerate
all table files; forced-JNI/non-raw splits also materialize every candidate row
before the Doris residual. These predicates cannot be changed by timestamp
repair. Please reject only timestamp-dependent subtrees, retain safe top-level
AND siblings (and keep a mixed OR residual), and apply that classification to
both FE paths. The JNI guard at `PaimonJniScanner.java:207` must likewise
preserve the trusted safe list, or FE serialization alone will not restore
reader filtering.
--
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]