This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch dev-1.1.2 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push: new a3a0e8ce0c [refactor](BE) return error status when vslot_ref contains invalid slot_id (#12106) a3a0e8ce0c is described below commit a3a0e8ce0c5842c471c821c996ead5ae294aa4d7 Author: minghong <minghong.z...@163.com> AuthorDate: Mon Aug 29 12:07:08 2022 +0800 [refactor](BE) return error status when vslot_ref contains invalid slot_id (#12106) In current implementation, we detect invalid slot at execute phase. At execute phase, it is hard to get useful information for further debug. This pr moves error detection ahead to prepare phase, so that we can log related tuple descriptors. --- be/src/vec/exprs/vslot_ref.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/be/src/vec/exprs/vslot_ref.cpp b/be/src/vec/exprs/vslot_ref.cpp index 81b845cb97..bf4d9db526 100644 --- a/be/src/vec/exprs/vslot_ref.cpp +++ b/be/src/vec/exprs/vslot_ref.cpp @@ -52,16 +52,15 @@ Status VSlotRef::prepare(doris::RuntimeState* state, const doris::RowDescriptor& return Status::InternalError(fmt::format("couldn't resolve slot descriptor {}", _slot_id)); } _column_id = desc.get_column_id(_slot_id); + if (_column_id < 0) { + LOG(INFO) << "VSlotRef - invalid slot id: " << _slot_id << " desc:" << desc.debug_string(); + return Status::InternalError("VSlotRef - invalid slot id {}", _slot_id); + } _column_name = &slot_desc->col_name(); return Status::OK(); } Status VSlotRef::execute(VExprContext* context, Block* block, int* result_column_id) { - // comment DCHECK temporarily to make fuzzy test run smoothly - // DCHECK_GE(_column_id, 0); - if (_column_id < 0) { - return Status::InternalError("invalid column id {}", _column_id); - } *result_column_id = _column_id; return Status::OK(); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org