mrhhsg commented on code in PR #10701:
URL: https://github.com/apache/doris/pull/10701#discussion_r916669902


##########
be/src/exec/olap_common.h:
##########
@@ -44,25 +45,26 @@ std::string cast_to_string(int8_t);
 /**
  * @brief Column's value range
  **/
-template <class T>
+template <doris::PrimitiveType primitive_type>
 class ColumnValueRange {
 public:
-    typedef typename std::set<T>::iterator iterator_type;
+    using CppType = typename 
doris::PrimitiveTypeTraits<primitive_type>::CppType;
+    using IteratorType = typename std::set<CppType>::iterator;
 
     ColumnValueRange();
 
-    ColumnValueRange(std::string col_name, PrimitiveType type);
+    ColumnValueRange(std::string col_name, doris::PrimitiveType type);
 
-    ColumnValueRange(std::string col_name, PrimitiveType type, const T& min, 
const T& max,
-                     bool contain_null);
+    ColumnValueRange(std::string col_name, doris::PrimitiveType type, const 
CppType& min,

Review Comment:
   Maybe we can remove the arg `type` because it is the same as the template 
arg `doris::PrimitiveType primitive_type`?



##########
be/src/exec/olap_common.cpp:
##########
@@ -42,17 +42,32 @@ std::string cast_to_string(int8_t value) {
 }
 
 template <>
-void ColumnValueRange<StringValue>::convert_to_fixed_value() {
+void 
ColumnValueRange<doris::PrimitiveType::TYPE_STRING>::convert_to_fixed_value() {

Review Comment:
   namespace `doris` is redundant.



-- 
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

Reply via email to