[refine](node) Remove the cse DCHECK from the constructor (#33856)
It's possible that a failure in the fe caused the check to fail, and at that moment, it may not be possible to retrieve the corresponding query ID from be.out.
diff --git a/be/src/exec/exec_node.cpp b/be/src/exec/exec_node.cpp
index eebb93c..382deaf 100644
--- a/be/src/exec/exec_node.cpp
+++ b/be/src/exec/exec_node.cpp
@@ -90,10 +90,7 @@
descs, std::vector {tnode.output_tuple_id}, std::vector {true});
}
if (!tnode.intermediate_output_tuple_id_list.empty()) {
- DCHECK(tnode.__isset.output_tuple_id) << " no final output tuple id";
// common subexpression elimination
- DCHECK_EQ(tnode.intermediate_output_tuple_id_list.size(),
- tnode.intermediate_projections_list.size());
_intermediate_output_row_descriptor.reserve(tnode.intermediate_output_tuple_id_list.size());
for (auto output_tuple_id : tnode.intermediate_output_tuple_id_list) {
_intermediate_output_row_descriptor.push_back(
@@ -108,6 +105,19 @@
Status ExecNode::init(const TPlanNode& tnode, RuntimeState* state) {
init_runtime_profile(get_name());
+ if (!tnode.intermediate_output_tuple_id_list.empty()) {
+ if (!tnode.__isset.output_tuple_id) {
+ return Status::InternalError("no final output tuple id");
+ }
+ if (tnode.intermediate_output_tuple_id_list.size() !=
+ tnode.intermediate_projections_list.size()) {
+ return Status::InternalError(
+ "intermediate_output_tuple_id_list size:{} not match "
+ "intermediate_projections_list size:{}",
+ tnode.intermediate_output_tuple_id_list.size(),
+ tnode.intermediate_projections_list.size());
+ }
+ }
if (tnode.__isset.vconjunct) {
vectorized::VExprContextSPtr context;
diff --git a/be/src/pipeline/pipeline_x/operator.cpp b/be/src/pipeline/pipeline_x/operator.cpp
index fab80e6c..d5afad1 100644
--- a/be/src/pipeline/pipeline_x/operator.cpp
+++ b/be/src/pipeline/pipeline_x/operator.cpp
@@ -110,6 +110,19 @@
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* /*state*/) {
std::string node_name = print_plan_node_type(tnode.node_type);
+ if (!tnode.intermediate_output_tuple_id_list.empty()) {
+ if (!tnode.__isset.output_tuple_id) {
+ return Status::InternalError("no final output tuple id");
+ }
+ if (tnode.intermediate_output_tuple_id_list.size() !=
+ tnode.intermediate_projections_list.size()) {
+ return Status::InternalError(
+ "intermediate_output_tuple_id_list size:{} not match "
+ "intermediate_projections_list size:{}",
+ tnode.intermediate_output_tuple_id_list.size(),
+ tnode.intermediate_projections_list.size());
+ }
+ }
auto substr = node_name.substr(0, node_name.find("_NODE"));
_op_name = substr + "_OPERATOR";
diff --git a/be/src/pipeline/pipeline_x/operator.h b/be/src/pipeline/pipeline_x/operator.h
index b470c92..efa35b2 100644
--- a/be/src/pipeline/pipeline_x/operator.h
+++ b/be/src/pipeline/pipeline_x/operator.h
@@ -164,10 +164,7 @@
descs, std::vector {tnode.output_tuple_id}, std::vector {true});
}
if (!tnode.intermediate_output_tuple_id_list.empty()) {
- DCHECK(tnode.__isset.output_tuple_id) << " no final output tuple id";
// common subexpression elimination
- DCHECK_EQ(tnode.intermediate_output_tuple_id_list.size(),
- tnode.intermediate_projections_list.size());
_intermediate_output_row_descriptor.reserve(
tnode.intermediate_output_tuple_id_list.size());
for (auto output_tuple_id : tnode.intermediate_output_tuple_id_list) {