Skip to content

Commit

Permalink
rf targets to cte
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Sep 13, 2024
1 parent 258ec3d commit 5dfa890
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 183 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1238,9 +1238,6 @@ public PlanFragment visitPhysicalCTEProducer(PhysicalCTEProducer<? extends Plan>
multiCastPlanFragment.setOutputExprs(outputs);
context.getCteProduceFragments().put(cteId, multiCastPlanFragment);
context.getCteProduceMap().put(cteId, cteProducer);
if (context.getRuntimeTranslator().isPresent()) {
context.getRuntimeTranslator().get().getContext().getCteProduceMap().put(cteId, cteProducer);
}
context.getPlanFragments().add(multiCastPlanFragment);
return child;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.doris.nereids.trees.expressions.Slot;
import org.apache.doris.nereids.trees.plans.Plan;
import org.apache.doris.nereids.trees.plans.physical.AbstractPhysicalJoin;
import org.apache.doris.nereids.trees.plans.physical.PhysicalCTEProducer;
import org.apache.doris.nereids.trees.plans.physical.PhysicalHashJoin;
import org.apache.doris.nereids.trees.plans.physical.PhysicalRelation;
import org.apache.doris.nereids.trees.plans.physical.RuntimeFilter;
Expand Down Expand Up @@ -118,11 +117,6 @@ public boolean equals(Object other) {

private final Map<Plan, EffectiveSrcType> effectiveSrcNodes = Maps.newHashMap();

private final Map<CTEId, PhysicalCTEProducer> cteProducerMap = Maps.newLinkedHashMap();

// cte whose runtime filter has been extracted
private final Set<CTEId> processedCTE = Sets.newHashSet();

private final SessionVariable sessionVariable;

private final FilterSizeLimits limits;
Expand Down Expand Up @@ -160,10 +154,6 @@ public RuntimeFilterContext(SessionVariable sessionVariable) {
this.limits = new FilterSizeLimits(sessionVariable);
}

public void setRelationsUsedByPlan(Plan plan, Set<PhysicalRelation> relations) {
relationsUsedByPlan.put(plan, relations);
}

/**
* return true, if the relation is in the subtree
*/
Expand All @@ -185,14 +175,6 @@ public FilterSizeLimits getLimits() {
return limits;
}

public Map<CTEId, PhysicalCTEProducer> getCteProduceMap() {
return cteProducerMap;
}

public Set<CTEId> getProcessedCTE() {
return processedCTE;
}

public void setTargetExprIdToFilter(ExprId id, RuntimeFilter filter) {
Preconditions.checkArgument(filter.getTargetSlots().stream().anyMatch(expr -> expr.getExprId() == id));
this.targetExprIdToFilter.computeIfAbsent(id, k -> Lists.newArrayList()).add(filter);
Expand Down
Loading

0 comments on commit 5dfa890

Please sign in to comment.