Skip to content

Commit

Permalink
[opt](pipeline) Return InternalError to FE instead of doing a useless…
Browse files Browse the repository at this point in the history
… DCHECK in ExecNode apache#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
  • Loading branch information
zhiqiang-hhhh committed Nov 15, 2023
1 parent ae4ae30 commit c31bbfc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion be/src/exec/exec_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,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));
Expand Down

0 comments on commit c31bbfc

Please sign in to comment.