zenoyang commented on code in PR #8967:
URL: https://github.com/apache/incubator-doris/pull/8967#discussion_r848388700


##########
be/src/vec/columns/predicate_column.h:
##########
@@ -205,13 +218,30 @@ class PredicateColumnType final : public 
COWHelper<IColumn, PredicateColumnType<
         }
     }
 
+    void insert_many_date(const char* data_ptr, size_t num) {
+        size_t intput_type_size  = sizeof(uint24_t);
+        size_t res_type_size = sizeof(uint32_t);
+        char* input_data_ptr = const_cast<char*>(data_ptr);
+        
+        char* res_ptr = (char*)data.get_end_ptr();
+        memset(res_ptr, 0, res_type_size * num);
+        for (int i = 0; i < num; i++) {

Review Comment:
   ok



##########
be/src/vec/columns/column_vector.h:
##########
@@ -168,18 +168,16 @@ class ColumnVector final : public 
COWHelper<ColumnVectorHelper, ColumnVector<T>>
     }
 
     void insert_date_column(const char* data_ptr, size_t num) {
-        size_t value_size = sizeof(uint24_t);
+        size_t input_value_size = sizeof(uint24_t);
+        
         for (int i = 0; i < num; i++) {
-            const char* cur_ptr = data_ptr + value_size * i;
-            uint64_t value = 0;
-            value = *(unsigned char*)(cur_ptr + 2);
-            value <<= 8;
-            value |= *(unsigned char*)(cur_ptr + 1);
-            value <<= 8;
-            value |= *(unsigned char*)(cur_ptr);
-            vectorized::VecDateTimeValue date;
-            date.from_olap_date(value);
-            this->insert_data(reinterpret_cast<char*>(&date), 0);
+            uint64_t val = 0;
+            memcpy((char*)(&val), data_ptr, input_value_size);
+            data_ptr += input_value_size;
+
+            VecDateTimeValue date;

Review Comment:
   ok



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