From d3fd9234479ace4618cd2eb0969acfcfd3350448 Mon Sep 17 00:00:00 2001 From: zhiqiang Date: Wed, 15 Nov 2023 04:15:21 -0600 Subject: [PATCH] [opt](pipeline) Return InternalError to FE instead of doing a useless DCHECK in ExecNode #27035 Effect: Client will see error message like below when BE meeting plan logical error. RROR 1105 (HY000): errCode = 2, detailMessage = ([xxx]())[CANCELLED]Logical error during processing VNewOlapScanNode(dr_case_tag), output of projections 2 mismatches with exec node output 3 --- be/src/exec/exec_node.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/be/src/exec/exec_node.cpp b/be/src/exec/exec_node.cpp index c416420ef2..4489f65778 100644 --- a/be/src/exec/exec_node.cpp +++ b/be/src/exec/exec_node.cpp @@ -537,7 +537,14 @@ Status ExecNode::do_projections(vectorized::Block* origin_block, vectorized::Blo if (rows != 0) { auto& mutable_columns = mutable_block.mutable_columns(); - DCHECK(mutable_columns.size() == _projections.size()); + + if (mutable_columns.size() != _projections.size()) { + return Status::InternalError( + "Logical error during processing {}, output of projections {} mismatches with " + "exec node output {}", + this->get_name(), _projections.size(), mutable_columns.size()); + } + for (int i = 0; i < mutable_columns.size(); ++i) { auto result_column_id = -1; RETURN_IF_ERROR(_projections[i]->execute(origin_block, &result_column_id));