xzj7019 commented on code in PR #19312: URL: https://github.com/apache/doris/pull/19312#discussion_r1324395860
########## fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterContext.java: ########## @@ -153,8 +154,11 @@ public void removeFilter(ExprId targetId, PhysicalHashJoin builderNode) { if (filters != null) { Iterator<RuntimeFilter> iter = filters.iterator(); while (iter.hasNext()) { - if (iter.next().getBuilderNode().equals(builderNode)) { + RuntimeFilter rf = iter.next(); + if (rf.getBuilderNode().equals(builderNode)) { + builderNode.getRuntimeFilters().remove(rf); iter.remove(); + prunedRF.add(rf); Review Comment: Seems that prunedRF is not used further? ########## fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPruner.java: ########## @@ -199,7 +189,7 @@ private boolean isEffectiveRuntimeFilter(EqualTo equalTo, PhysicalHashJoin join) if (probeColumnStat.isUnKnown || buildColumnStat.isUnKnown) { return true; } - return probeColumnStat.notEnclosed(buildColumnStat) - || buildColumnStat.ndv < probeColumnStat.ndv * 0.95; + double buildNdvInProbeRange = buildColumnStat.ndvIntersection(probeColumnStat); + return probeColumnStat.ndv > buildNdvInProbeRange * (1 + ColumnStatistic.STATS_ERROR); Review Comment: what is the STATS_ERROR meaning? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org