From 8edbe39de8ec2566db15b0ef59bccc4861be4995 Mon Sep 17 00:00:00 2001 From: morrySnow <101034200+morrySnow@users.noreply.github.com> Date: Fri, 29 Jul 2022 14:15:06 +0800 Subject: [PATCH] [project-node]add projection thrift (#11309) --- .../src/main/java/org/apache/doris/planner/HashJoinNode.java | 2 ++ gensrc/thrift/PlanNodes.thrift | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java index 6f1fb8172a..7f90ca0634 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java @@ -1056,10 +1056,12 @@ public class HashJoinNode extends PlanNode { if (vSrcToOutputSMap != null) { for (int i = 0; i < vSrcToOutputSMap.size(); i++) { msg.hash_join_node.addToSrcExprList(vSrcToOutputSMap.getLhs().get(i).treeToThrift()); + msg.addToProjections(vSrcToOutputSMap.getLhs().get(i).treeToThrift()); } } if (vOutputTupleDesc != null) { msg.hash_join_node.setVoutputTupleId(vOutputTupleDesc.getId().asInt()); + msg.setOutputTupleId(vOutputTupleDesc.getId().asInt()); } if (vIntermediateTupleDescList != null) { for (TupleDescriptor tupleDescriptor : vIntermediateTupleDescList) { diff --git a/gensrc/thrift/PlanNodes.thrift b/gensrc/thrift/PlanNodes.thrift index b3823f1cf6..e3cc0679b8 100644 --- a/gensrc/thrift/PlanNodes.thrift +++ b/gensrc/thrift/PlanNodes.thrift @@ -473,6 +473,7 @@ struct THashJoinNode { // hash output column 6: optional list hash_output_slot_ids + // TODO: remove 7 and 8 in the version after the version include projection on ExecNode 7: optional list srcExprList 8: optional Types.TTupleId voutput_tuple_id @@ -878,6 +879,9 @@ struct TPlanNode { // file scan node 44: optional TFileScanNode file_scan_node + + 101: optional list projections + 102: optional Types.TTupleId output_tuple_id } // A flattened representation of a tree of PlanNodes, obtained by depth-first