[fix](nereids) do not generate runtime filter on schema-scan (#35655)
## Proposed changes schema-scan node does not support runtime filter Issue Number: close #xxx <!--Describe your changes.-->
This commit is contained in:
@ -51,6 +51,7 @@ import org.apache.doris.nereids.trees.plans.physical.PhysicalOneRowRelation;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalPlan;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalProject;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalRelation;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalSchemaScan;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalSetOperation;
|
||||
import org.apache.doris.nereids.trees.plans.physical.RuntimeFilter;
|
||||
import org.apache.doris.nereids.util.ExpressionUtils;
|
||||
@ -482,6 +483,9 @@ public class RuntimeFilterGenerator extends PlanPostProcessor {
|
||||
|
||||
@Override
|
||||
public PhysicalRelation visitPhysicalRelation(PhysicalRelation relation, CascadesContext context) {
|
||||
if (relation instanceof PhysicalSchemaScan) {
|
||||
return relation;
|
||||
}
|
||||
// add all the slots in map.
|
||||
RuntimeFilterContext ctx = context.getRuntimeFilterContext();
|
||||
relation.getOutput().forEach(slot -> ctx.aliasTransferMapPut(slot, Pair.of(relation, slot)));
|
||||
|
||||
@ -37,6 +37,7 @@ import org.apache.doris.nereids.trees.plans.physical.PhysicalHashJoin;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalNestedLoopJoin;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalProject;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalRelation;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalSchemaScan;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalSetOperation;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalTopN;
|
||||
import org.apache.doris.nereids.trees.plans.physical.PhysicalWindow;
|
||||
@ -188,6 +189,9 @@ public class RuntimeFilterPushDownVisitor extends PlanVisitor<Boolean, PushDownC
|
||||
|
||||
@Override
|
||||
public Boolean visitPhysicalRelation(PhysicalRelation scan, PushDownContext ctx) {
|
||||
if (scan instanceof PhysicalSchemaScan) {
|
||||
return false;
|
||||
}
|
||||
Preconditions.checkArgument(ctx.isValid(),
|
||||
"runtime filter pushDownContext is invalid");
|
||||
PhysicalRelation relation = ctx.finalTarget.first;
|
||||
|
||||
Reference in New Issue
Block a user