HappenLee commented on code in PR #64318:
URL: https://github.com/apache/doris/pull/64318#discussion_r3425390059
##########
be/src/exec/runtime_filter/runtime_filter_partition_pruner.cpp:
##########
@@ -40,6 +44,46 @@
namespace doris {
+namespace {
+
+template <typename T>
+struct ColumnValueRangePrimitiveType;
+
+template <PrimitiveType PT>
+struct ColumnValueRangePrimitiveType<ColumnValueRange<PT>> {
+ static constexpr PrimitiveType value = PT;
+};
+
+template <typename CvrType>
+bool bloom_may_match_fixed_values(const CvrType& cvr, BloomFilterFuncBase*
bloom_filter) {
+ static constexpr PrimitiveType PT =
ColumnValueRangePrimitiveType<CvrType>::value;
+ using CppType = typename PrimitiveTypeTraits<PT>::CppType;
+ using ColumnType = typename PrimitiveTypeTraits<PT>::ColumnType;
+
+ MutableColumnPtr values_column;
+ if constexpr (IsDecimalNumber<CppType>) {
+ values_column = ColumnType::create(0, cvr.scale());
+ } else {
+ values_column = ColumnType::create();
+ }
+ auto* typed_column = assert_cast<ColumnType*>(values_column.get());
Review Comment:
better static_cast no need assert to check
--
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]