[minor](Nereids): remove useless override (#33651)
This commit is contained in:
@ -26,9 +26,13 @@ import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
|
||||
import org.apache.doris.nereids.util.MutableState;
|
||||
import org.apache.doris.nereids.util.MutableState.MultiMutableState;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Used for unit test only.
|
||||
@ -88,7 +92,12 @@ public class FakePlan implements Plan {
|
||||
|
||||
@Override
|
||||
public List<Slot> getOutput() {
|
||||
return new ArrayList<>();
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Slot> getOutputSet() {
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -98,9 +98,7 @@ public interface Plan extends TreeNode<Plan> {
|
||||
/**
|
||||
* Get output slot set of the plan.
|
||||
*/
|
||||
default Set<Slot> getOutputSet() {
|
||||
return ImmutableSet.copyOf(getOutput());
|
||||
}
|
||||
Set<Slot> getOutputSet();
|
||||
|
||||
/** getOutputExprIds */
|
||||
default List<ExprId> getOutputExprIds() {
|
||||
|
||||
@ -33,6 +33,7 @@ import com.google.common.collect.ImmutableList;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* All DDL and DML commands' super class.
|
||||
@ -101,6 +102,11 @@ public abstract class Command extends AbstractPlan implements LogicalPlan, Block
|
||||
throw new RuntimeException("Command do not implement getOutput");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Slot> getOutputSet() {
|
||||
throw new RuntimeException("Command do not implement getOutputSet");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String treeString() {
|
||||
throw new RuntimeException("Command do not implement treeString");
|
||||
|
||||
@ -29,7 +29,6 @@ import org.apache.doris.nereids.properties.LogicalProperties;
|
||||
import org.apache.doris.nereids.properties.PhysicalProperties;
|
||||
import org.apache.doris.nereids.trees.expressions.Expression;
|
||||
import org.apache.doris.nereids.trees.expressions.NamedExpression;
|
||||
import org.apache.doris.nereids.trees.expressions.Slot;
|
||||
import org.apache.doris.nereids.trees.plans.Plan;
|
||||
import org.apache.doris.nereids.trees.plans.PlanType;
|
||||
import org.apache.doris.nereids.trees.plans.algebra.Sink;
|
||||
@ -40,12 +39,10 @@ import org.apache.doris.statistics.Statistics;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* physical olap table sink for insert command
|
||||
@ -165,19 +162,6 @@ public class PhysicalOlapTableSink<CHILD_TYPE extends Plan> extends PhysicalTabl
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Slot> getOutput() {
|
||||
return computeOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* override function of AbstractPlan.
|
||||
*/
|
||||
@Override
|
||||
public Set<Slot> getOutputSet() {
|
||||
return ImmutableSet.copyOf(getOutput());
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, C> R accept(PlanVisitor<R, C> visitor, C context) {
|
||||
return visitor.visitPhysicalOlapTableSink(this, context);
|
||||
|
||||
@ -315,9 +315,4 @@ public class PhysicalProject<CHILD_TYPE extends Plan> extends PhysicalUnary<CHIL
|
||||
public void setMultiLayerProjects(List<List<NamedExpression>> multiLayers) {
|
||||
this.multiLayerProjects = multiLayers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Slot> getOutput() {
|
||||
return computeOutput();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user