[opt](nereids) let DBA ignore some runtime filters (#25933)
example: set ignore_runtime_filter_ids="3, 1"; after this setting, RF003 and RF001 will be ignored
This commit is contained in:
@ -38,6 +38,7 @@ import org.apache.doris.planner.HashJoinNode.DistributionMode;
|
||||
import org.apache.doris.planner.JoinNodeBase;
|
||||
import org.apache.doris.planner.RuntimeFilter.RuntimeFilterTarget;
|
||||
import org.apache.doris.planner.ScanNode;
|
||||
import org.apache.doris.qe.ConnectContext;
|
||||
import org.apache.doris.qe.SessionVariable;
|
||||
import org.apache.doris.statistics.StatisticalType;
|
||||
import org.apache.doris.thrift.TRuntimeFilterType;
|
||||
@ -111,6 +112,11 @@ public class RuntimeFilterTranslator {
|
||||
* @param ctx plan translator context
|
||||
*/
|
||||
public void createLegacyRuntimeFilter(RuntimeFilter filter, JoinNodeBase node, PlanTranslatorContext ctx) {
|
||||
if (ConnectContext.get() != null
|
||||
&& ConnectContext.get().getSessionVariable()
|
||||
.getIgnoredRuntimeFilterIds().contains(filter.getId().asInt())) {
|
||||
return;
|
||||
}
|
||||
Expr src = ExpressionTranslator.translate(filter.getSrcExpr(), ctx);
|
||||
List<Expr> targetExprList = new ArrayList<>();
|
||||
List<Map<TupleId, List<SlotId>>> targetTupleIdMapList = new ArrayList<>();
|
||||
|
||||
@ -1252,6 +1252,29 @@ public class SessionVariable implements Serializable, Writable {
|
||||
description = {"是否启用更快的浮点数转换算法,注意会影响输出格式", "Set true to enable faster float pointer number convert"})
|
||||
public boolean fasterFloatConvert = false;
|
||||
|
||||
@VariableMgr.VarAttr(name = IGNORE_RUNTIME_FILTER_IDS,
|
||||
description = {"the runtime filter id in IGNORE_RUNTIME_FILTER_IDS list will not be generated"})
|
||||
|
||||
public String ignoreRuntimeFilterIds = "";
|
||||
public static final String IGNORE_RUNTIME_FILTER_IDS = "ignore_runtime_filter_ids";
|
||||
|
||||
public Set<Integer> getIgnoredRuntimeFilterIds() {
|
||||
return Arrays.stream(ignoreRuntimeFilterIds.split(",[\\s]*"))
|
||||
.map(v -> {
|
||||
int res = -1;
|
||||
try {
|
||||
res = Integer.valueOf(v);
|
||||
} catch (Exception e) {
|
||||
//ignore it
|
||||
}
|
||||
return res;
|
||||
}).collect(ImmutableSet.toImmutableSet());
|
||||
}
|
||||
|
||||
public void setIgnoreRuntimeFilterIds(String ignoreRuntimeFilterIds) {
|
||||
this.ignoreRuntimeFilterIds = ignoreRuntimeFilterIds;
|
||||
}
|
||||
|
||||
public static final String IGNORE_SHAPE_NODE = "ignore_shape_nodes";
|
||||
|
||||
public Set<String> getIgnoreShapePlanNodes() {
|
||||
|
||||
Reference in New Issue
Block a user