[enhancement](VSlotRef) enhance column_id check in execute function during runtime (#11862)

The column id check in VSlotRef::execute function before is too strict for fuzzy test to continuously produce random query. Temporarily loosen the check logic.
Moreover, there exists some careless call to VExpr::get_const_col, it might return a nullptr but not every function call checks if it's valid. It's an underlying problem.
This commit is contained in:
AlexYue
2022-08-18 09:12:26 +08:00
committed by GitHub
parent 582be130dd
commit 8b10a1a3f7
11 changed files with 29 additions and 12 deletions

View File

@ -17,6 +17,7 @@
#include "vec/exprs/vcase_expr.h"
#include "common/status.h"
#include "vec/columns/column_nullable.h"
namespace doris::vectorized {
@ -94,7 +95,7 @@ Status VCaseExpr::execute(VExprContext* context, Block* block, int* result_colum
for (int i = 0; i < _children.size(); i++) {
int column_id = -1;
_children[i]->execute(context, block, &column_id);
RETURN_IF_ERROR(_children[i]->execute(context, block, &column_id));
arguments[i] = column_id;
block->replace_by_position_if_const(column_id);