github-actions[bot] commented on code in PR #62589:
URL: https://github.com/apache/doris/pull/62589#discussion_r3225527557
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java:
##########
@@ -228,6 +230,18 @@ private void
createLegacyRuntimeFilterFromGroup(List<RuntimeFilter> group,
Expr targetExpr = targetExprList.get(i);
origFilter.addTarget(new RuntimeFilterTarget(
scanNode, targetExpr, true, isLocalTarget));
+ RuntimeFilterPartitionPruneClassifier.Classification
classification =
+ RuntimeFilterPartitionPruneClassifier.classify(
+ targetExpr, nereidsTargetExprList.get(i),
scanNode);
+ if (classification.canPrunePartitions()) {
+
origFilter.markTargetCanPrunePartitions(scanNode.getId());
+ }
+ if (classification.emitTargetMonotonicity()) {
+ origFilter.setTargetMonotonicity(scanNode.getId(),
+ classification.getMonotonicity());
+ }
+ origFilter.setTargetPartitionMonotonicity(
+ scanNode.getId(),
classification.getPartitionMonotonicity());
Review Comment:
This partition-pruning metadata is keyed only by `scanNode.getId()`, but a
grouped runtime filter can contain more than one target for the same
`OlapScanNode` after RF propagation through equalities on that scan. In that
case the later target overwrites the same scan-id entry here, while
`TRuntimeFilterDesc.planId_to_target_expr` is also serialized as one expression
per plan node. BE therefore cannot tell which target expression the
monotonicity map belongs to; if one target is eligible and another same-scan
target is not (or has different per-partition monotonicity), the scan can
receive stale/incorrect pruning metadata for the expression it actually
evaluates and false-prune partitions. Please either prevent grouped filters
from contributing more than one partition-pruning target per scan node, or key
the pruning metadata by target expression/slot as well as scan id and add a
grouped same-scan regression case.
--
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]