yiguolei commented on code in PR #59005:
URL: https://github.com/apache/doris/pull/59005#discussion_r2622273511
##########
be/src/runtime/runtime_predicate.cpp:
##########
@@ -55,16 +55,31 @@ RuntimePredicate::RuntimePredicate(const TTopnFilterDesc&
desc)
:
create_comparison_predicate0<PredicateType::GE>;
}
-void RuntimePredicate::init_target(
- int32_t target_node_id, phmap::flat_hash_map<int, SlotDescriptor*>
slot_id_to_slot_desc) {
+Status RuntimePredicate::init_target(
+ int32_t target_node_id, phmap::flat_hash_map<int, SlotDescriptor*>
slot_id_to_slot_desc,
+ const doris::RowDescriptor& desc) {
std::unique_lock<std::shared_mutex> wlock(_rwlock);
check_target_node_id(target_node_id);
if (target_is_slot(target_node_id)) {
_contexts[target_node_id].col_name =
slot_id_to_slot_desc[get_texpr(target_node_id).nodes[0].slot_ref.slot_id]
->col_name();
+ auto slot_id = get_texpr(target_node_id).nodes[0].slot_ref.slot_id;
+ auto column_id = desc.get_column_id(slot_id);
+ if (column_id < 0) {
+ return Status::Error<ErrorCode::INTERNAL_ERROR>(
+ "RuntimePredicate has invalid slot id: {}, name: {}, desc:
{}, slot_desc: {}",
+ slot_id,
+
slot_id_to_slot_desc[get_texpr(target_node_id).nodes[0].slot_ref.slot_id]
+ ->col_name(),
+ desc.debug_string(),
+
slot_id_to_slot_desc[get_texpr(target_node_id).nodes[0].slot_ref.slot_id]
Review Comment:
我们这个可能不对,之前的可能是对的
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]