github-actions[bot] commented on code in PR #62589:
URL: https://github.com/apache/doris/pull/62589#discussion_r3220461861


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java:
##########
@@ -322,6 +336,18 @@ public void createLegacyRuntimeFilter(RuntimeFilter 
filter, PlanNode node, PlanT
                     Expr targetExpr = targetExprList.get(i);
                     origFilter.addTarget(new RuntimeFilterTarget(
                             scanNode, targetExpr, true, isLocalTarget));
+                    RuntimeFilterPartitionPruneClassifier.Classification 
classification =
+                            RuntimeFilterPartitionPruneClassifier.classify(
+                                    targetExpr, 
filter.getTargetExpressions().get(i), scanNode);

Review Comment:
   The classifier is proving monotonicity from 
`filter.getTargetExpressions().get(i)`, but the BE will project partition 
boundaries through the final legacy `targetExpr` stored in the RF, including 
any `CastExpr` injected by the type-adjustment block above. That means a target 
expression that is locally monotonic before type adjustment can still be marked 
safe even though the actual expression evaluated in 
`ParsedPartitionBoundaries::get_or_compute_projection()` has one more cast on 
top that was not checked against the partition range.
   
   Please either classify an equivalent Nereids expression that includes the 
inserted cast, or conservatively skip RF partition pruning whenever the 
adjustment at line 307 wraps a non-identity target. The current tests cover the 
bare-slot implicit-cast case, but not a locally monotonic non-slot target with 
an added outer cast.



-- 
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]

Reply via email to