yiguolei commented on code in PR #26191:
URL: https://github.com/apache/doris/pull/26191#discussion_r1378861254
##########
be/src/olap/comparison_predicate.h:
##########
@@ -232,8 +251,16 @@ class ComparisonPredicateBase : public ColumnPredicate {
if constexpr (std::is_same_v<T, StringRef>) {
return bf->test_bytes(_value.data, _value.size);
} else {
- return bf->test_bytes(const_cast<char*>(reinterpret_cast<const
char*>(&_value)),
- sizeof(WarpperFieldType));
+ // DecimalV2 using decimal12_t in bloom filter, should convert
value to decimal12_t
+ if constexpr (Type == PrimitiveType::TYPE_DECIMALV2) {
+ decimal12_t decimal12_t_val(_value.int_value(),
_value.frac_value());
+ return bf->test_bytes(
Review Comment:
what about datev1 and datetimev1, do they also need convert to storage type
here? if not please add comment here to explain the reason.
##########
be/src/olap/comparison_predicate.h:
##########
@@ -232,8 +251,16 @@ class ComparisonPredicateBase : public ColumnPredicate {
if constexpr (std::is_same_v<T, StringRef>) {
return bf->test_bytes(_value.data, _value.size);
} else {
- return bf->test_bytes(const_cast<char*>(reinterpret_cast<const
char*>(&_value)),
- sizeof(WarpperFieldType));
+ // DecimalV2 using decimal12_t in bloom filter, should convert
value to decimal12_t
+ if constexpr (Type == PrimitiveType::TYPE_DECIMALV2) {
+ decimal12_t decimal12_t_val(_value.int_value(),
_value.frac_value());
+ return bf->test_bytes(
Review Comment:
what about datev1 and datetimev1, do they also need convert to storage type
here? if not please add comment here to explain the reason.
--
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]