[Improvement](bloom filter) adjust bloom filter size (#18846)
This commit is contained in:
@ -127,14 +127,6 @@ public class RuntimeFilterTranslator {
|
||||
targetExpr = new CastExpr(src.getType(), targetExpr);
|
||||
}
|
||||
FilterSizeLimits filterSizeLimits = context.getLimits();
|
||||
if (node instanceof HashJoinNode
|
||||
&& !(((HashJoinNode) node).getDistributionMode() == DistributionMode.BROADCAST)
|
||||
&& ConnectContext.get() != null
|
||||
&& ConnectContext.get().getSessionVariable().enablePipelineEngine()
|
||||
&& ConnectContext.get().getSessionVariable().getParallelExecInstanceNum() > 0) {
|
||||
filterSizeLimits = filterSizeLimits.adjustForParallel(
|
||||
ConnectContext.get().getSessionVariable().getParallelExecInstanceNum());
|
||||
}
|
||||
org.apache.doris.planner.RuntimeFilter origFilter
|
||||
= org.apache.doris.planner.RuntimeFilter.fromNereidsRuntimeFilter(
|
||||
filter.getId(), node, src, filter.getExprOrder(), targetExpr,
|
||||
|
||||
@ -117,17 +117,6 @@ public final class RuntimeFilterGenerator {
|
||||
defaultValue = Math.max(defaultValue, minVal);
|
||||
defaultVal = BitUtil.roundUpToPowerOf2(Math.min(defaultValue, maxVal));
|
||||
}
|
||||
|
||||
private FilterSizeLimits(long maxVal, long minVal, long defaultVal) {
|
||||
this.maxVal = BitUtil.roundUpToPowerOf2(maxVal);
|
||||
this.minVal = BitUtil.roundUpToPowerOf2(minVal);
|
||||
defaultVal = Math.max(defaultVal, this.minVal);
|
||||
this.defaultVal = BitUtil.roundUpToPowerOf2(Math.min(defaultVal, this.maxVal));
|
||||
}
|
||||
|
||||
public FilterSizeLimits adjustForParallel(int parallel) {
|
||||
return new FilterSizeLimits(maxVal / parallel, minVal / parallel, defaultVal / parallel);
|
||||
}
|
||||
}
|
||||
|
||||
// Contains size limits for bloom filters.
|
||||
|
||||
Reference in New Issue
Block a user