github-actions[bot] commented on code in PR #65919:
URL: https://github.com/apache/doris/pull/65919#discussion_r3635869303
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java:
##########
@@ -388,6 +381,18 @@ private org.apache.doris.planner.RuntimeFilter
finalize(org.apache.doris.planner
return origFilter;
}
+ private void
setPartitionPruningMetadata(org.apache.doris.planner.RuntimeFilter
runtimeFilter,
+ ScanNode scanNode,
RuntimeFilterPartitionPruneClassifier.Classification classification) {
+ if (classification.canPrunePartitions()) {
+ Preconditions.checkState(scanNode instanceof OlapScanNode,
+ "partition-pruning runtime filter target must be an
OlapScanNode");
+ runtimeFilter.markTargetCanPrunePartitions(scanNode.getId());
+ ((OlapScanNode)
scanNode).snapshotPartitionBoundariesForRuntimeFilter();
Review Comment:
[P2] Skip snapshots that the scan can never consume
With exactly one selected non-default LIST partition, the classifier still
returns `canPrunePartitions()`, so this call materializes and retains a
`TExprNode` for every LIST value while the planner holds the table locks.
However, `OlapScanNode.hasRfDrivingPartitionPruning()` unconditionally returns
`false` when `selectedPartitionIds.size() < 2`, so no current or later
session-setting transition can ever serialize or use that payload. Before this
change the builder ran only behind that gate. Please mirror the
minimum-partition check before marking and snapshotting (or centralize the
eligibility decision) so a statically single-partition join does not pay O(list
values) planning CPU and heap for unreachable metadata.
--
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]