github-actions[bot] commented on code in PR #28307: URL: https://github.com/apache/doris/pull/28307#discussion_r1424746276
########## be/src/vec/exec/vsort_node.cpp: ########## @@ -144,15 +144,17 @@ Status VSortNode::sink(RuntimeState* state, vectorized::Block* input_block, bool // update runtime predicate if (_use_topn_opt) { - Field new_top = _sorter->get_top_value(); - if (!new_top.is_null() && (old_top.is_null() || new_top != old_top)) { - auto& sort_description = _sorter->get_sort_description(); - auto col = input_block->get_by_position(sort_description[0].column_number); - bool is_reverse = sort_description[0].direction < 0; - auto query_ctx = state->get_query_ctx(); - RETURN_IF_ERROR( - query_ctx->get_runtime_predicate().update(new_top, col.name, is_reverse)); - old_top = std::move(new_top); + auto& sort_description = _sorter->get_sort_description(); + auto col = input_block->get_by_position(sort_description[0].column_number); + if (!col.name.empty()) { + Field new_top = _sorter->get_top_value(); + if (!new_top.is_null() && (old_top.is_null() || new_top != old_top)) { + bool is_reverse = sort_description[0].direction < 0; + auto query_ctx = state->get_query_ctx(); Review Comment: warning: 'auto query_ctx' can be declared as 'auto *query_ctx' [readability-qualified-auto] ```suggestion auto *query_ctx = state->get_query_ctx(); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org