Mryange commented on code in PR #52475:
URL: https://github.com/apache/doris/pull/52475#discussion_r2184223598


##########
be/src/olap/column_predicate.h:
##########
@@ -61,10 +61,14 @@ ResultType get_zone_map_value(void* data_ptr) {
         res.from_olap_decimal(decimal_12_t_value.integer, 
decimal_12_t_value.fraction);
     } else if constexpr (primitive_type == PrimitiveType::TYPE_DATE) {
         static_assert(std::is_same_v<ResultType, VecDateTimeValue>);
-        res.from_olap_date(*reinterpret_cast<uint24_t*>(data_ptr));
+        uint24_t date;
+        memcpy(&date, data_ptr, sizeof(uint24_t));

Review Comment:
   > why not use unaligned_load here?
   
   也可以,但是看上下代码都用的memcpy,就用的memcpy保持一致了。



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

Reply via email to