yiguolei commented on code in PR #64128:
URL: https://github.com/apache/doris/pull/64128#discussion_r3410726595
##########
be/src/storage/predicate/in_list_predicate.h:
##########
@@ -534,17 +536,12 @@ class InListPredicateBase final : public ColumnPredicate {
__builtin_unreachable();
}
} else {
- auto& pred_col =
- assert_cast<const
PredicateColumnType<PredicateEvaluateType<Type>>*>(column)
- ->get_data();
- auto pred_col_data = pred_col.data();
-
+ // ptr_at safe: HybridSet::find consumes the pointer synchronously.
+ ColumnElementView<Type> pred_col {*column};
#define EVALUATE_WITH_NULL_IMPL(IDX) \
- is_opposite ^ \
- (!(*null_map)[IDX] && \
- _operator(_values->find(reinterpret_cast<const
T*>(&pred_col_data[IDX])), false))
+ is_opposite ^ (!(*null_map)[IDX] &&
_operator(_values->find(pred_col.ptr_at(IDX)), false))
#define EVALUATE_WITHOUT_NULL_IMPL(IDX) \
- is_opposite ^ _operator(_values->find(reinterpret_cast<const
T*>(&pred_col_data[IDX])), false)
+ is_opposite ^ _operator(_values->find(pred_col.ptr_at(IDX)), false)
Review Comment:
这里对于string 来说已经是stringref了,然后数值类型的就是一个数字, 我们这里转成指针有必要吗?
--
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]