diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java index 60458eb2a243fe..4777e2b65b81b6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java @@ -20,7 +20,6 @@ import org.apache.doris.catalog.Column; import org.apache.doris.catalog.OlapTable; import org.apache.doris.catalog.Table; -import org.apache.doris.common.util.Util; import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.properties.LogicalProperties; import org.apache.doris.nereids.rules.rewrite.mv.AbstractSelectMaterializedIndexRule; @@ -33,20 +32,17 @@ import org.apache.doris.nereids.trees.plans.algebra.OlapScan; import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; import org.apache.doris.nereids.util.Utils; -import org.apache.doris.qe.ConnectContext; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; -import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * Logical OlapScan. @@ -290,13 +286,7 @@ public List computeOutput() { if (selectedIndexId != ((OlapTable) table).getBaseIndexId()) { return getOutputByIndex(selectedIndexId); } - List otherColumns = new ArrayList<>(); - if (!Util.showHiddenColumns() && getTable().hasDeleteSign() - && !ConnectContext.get().getSessionVariable() - .skipDeleteSign()) { - otherColumns.add(getTable().getDeleteSignColumn()); - } - return Stream.concat(table.getBaseSchema().stream(), otherColumns.stream()) + return table.getBaseSchema(true).stream() .map(col -> { if (cacheSlotWithSlotName.containsKey(col.getName())) { return cacheSlotWithSlotName.get(col.getName()); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java index af012ce3fb9f95..e23c67ed56093c 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/BindRelationTest.java @@ -93,7 +93,7 @@ public void bindExternalRelation() { OlapTable externalOlapTable = new OlapTable(1, tableName, externalTableColumns, KeysType.DUP_KEYS, new PartitionInfo(), new RandomDistributionInfo(10)) { @Override - public List getBaseSchema() { + public List getBaseSchema(boolean full) { return externalTableColumns; } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneOlapScanTabletTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneOlapScanTabletTest.java index e0244a80e3e8d6..38cdc115def2ab 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneOlapScanTabletTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PruneOlapScanTabletTest.java @@ -106,7 +106,7 @@ void testPruneOlapScanTablet(@Mocked OlapTable olapTable, olapTable.getPartitionIds(); result = ImmutableList.of(1L); - olapTable.getBaseSchema(); + olapTable.getBaseSchema(true); result = columns; olapTable.getName();