This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new 8ec14a78ff Revert "[fix](fe)project should be done inside subquery
(#17716)" (#17774)
8ec14a78ff is described below
commit 8ec14a78ff7207d6411b1efe5c9ca37237fca73a
Author: Mingyu Chen <[email protected]>
AuthorDate: Tue Mar 14 16:19:14 2023 +0800
Revert "[fix](fe)project should be done inside subquery (#17716)" (#17774)
This reverts commit db32b251e6a9c3b8307484803af34a0868093e25.
Reverts #17716
This PR may cause `couldn't resolve slot descriptor error.`
---
.../apache/doris/planner/NestedLoopJoinNode.java | 4 +--
.../org/apache/doris/planner/OlapScanNode.java | 42 ----------------------
.../java/org/apache/doris/planner/SelectNode.java | 3 +-
.../query_p0/group_concat/test_group_concat.out | 1 +
4 files changed, 4 insertions(+), 46 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/NestedLoopJoinNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/NestedLoopJoinNode.java
index 421c534860..4f4f0dfded 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/NestedLoopJoinNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/NestedLoopJoinNode.java
@@ -70,8 +70,8 @@ public class NestedLoopJoinNode extends JoinNodeBase {
public NestedLoopJoinNode(PlanNodeId id, PlanNode outer, PlanNode inner,
TableRef innerRef) {
super(id, "NESTED LOOP JOIN", StatisticalType.NESTED_LOOP_JOIN_NODE,
outer, inner, innerRef);
- tupleIds.addAll(outer.getOutputTupleIds());
- tupleIds.addAll(inner.getOutputTupleIds());
+ tupleIds.addAll(outer.getTupleIds());
+ tupleIds.addAll(inner.getTupleIds());
}
public boolean canParallelize() {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
index 582aef8de5..14577c1967 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
@@ -22,7 +22,6 @@ import org.apache.doris.analysis.BaseTableRef;
import org.apache.doris.analysis.BinaryPredicate;
import org.apache.doris.analysis.CastExpr;
import org.apache.doris.analysis.Expr;
-import org.apache.doris.analysis.ExprSubstitutionMap;
import org.apache.doris.analysis.InPredicate;
import org.apache.doris.analysis.IntLiteral;
import org.apache.doris.analysis.PartitionNames;
@@ -1244,45 +1243,4 @@ public class OlapScanNode extends ScanNode {
public String getSelectedIndexName() {
return olapTable.getIndexNameById(selectedIndexId);
}
-
- public void setOutputSmap(ExprSubstitutionMap smap, Analyzer analyzer) {
- if (smap.getRhs().stream().anyMatch(expr -> !(expr instanceof
SlotRef))) {
- if (outputTupleDesc == null) {
- outputTupleDesc =
analyzer.getDescTbl().createTupleDescriptor("OlapScanNode");
- outputTupleDesc.setTable(this.olapTable);
- }
- if (projectList == null) {
- projectList = Lists.newArrayList();
- }
- List<Expr> newRhs = Lists.newArrayList();
- List<Expr> newLhs = Lists.newArrayList();
- for (Expr expr : smap.getRhs()) {
- if (expr instanceof SlotRef && !((SlotRef)
expr).getDesc().isMaterialized()) {
- continue;
- }
- if (outputSmap.mappingForRhsExpr(expr) != null) {
- newLhs.add(outputSmap.mappingForRhsExpr(expr));
- newRhs.add(expr);
- } else {
- SlotDescriptor slotDesc =
analyzer.addSlotDescriptor(outputTupleDesc);
- slotDesc.initFromExpr(expr);
- slotDesc.setIsMaterialized(true);
- slotDesc.materializeSrcExpr();
- projectList.add(expr);
- newLhs.add(smap.mappingForRhsExpr(expr));
- newRhs.add(new SlotRef(slotDesc));
- }
- }
- outputSmap = new ExprSubstitutionMap(newLhs, newRhs);
- } else {
- outputSmap = smap;
- }
- }
-
- public List<TupleId> getOutputTupleIds() {
- if (outputTupleDesc != null) {
- return Lists.newArrayList(outputTupleDesc.getId());
- }
- return tupleIds;
- }
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/SelectNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/SelectNode.java
index 6d78b5cb48..2baa6e6f13 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SelectNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SelectNode.java
@@ -32,7 +32,6 @@ import org.apache.doris.thrift.TPlanNodeType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -42,7 +41,7 @@ public class SelectNode extends PlanNode {
private static final Logger LOG = LogManager.getLogger(SelectNode.class);
protected SelectNode(PlanNodeId id, PlanNode child, List<Expr> conjuncts) {
- super(id, new ArrayList<>(child.getOutputTupleIds()), "SELECT",
StatisticalType.SELECT_NODE);
+ super(id, child.getTupleIds(), "SELECT", StatisticalType.SELECT_NODE);
addChild(child);
this.tblRefIds = child.tblRefIds;
this.nullableTupleIds = child.nullableTupleIds;
diff --git a/regression-test/data/query_p0/group_concat/test_group_concat.out
b/regression-test/data/query_p0/group_concat/test_group_concat.out
index e61bd4fd4f..8caca13a7e 100644
--- a/regression-test/data/query_p0/group_concat/test_group_concat.out
+++ b/regression-test/data/query_p0/group_concat/test_group_concat.out
@@ -25,3 +25,4 @@ false
25699 1989
2147483647 255:1991:32767:32767
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]