gavinchou commented on code in PR #53578:
URL: https://github.com/apache/doris/pull/53578#discussion_r2218685159


##########
be/src/exec/olap_common.h:
##########
@@ -670,14 +671,15 @@ bool 
ColumnValueRange<primitive_type>::convert_to_avg_range_value(
 
         // When CppType is date, we can not convert it to integer number and 
calculate distance.
         // In other case, we convert element to int128 to avoit overflow.
-        size_t step_size = (cast(max_value) - min_value) / max_scan_key_num;
+        int128_t step_size_may_overflow = (cast(max_value) - min_value) / 
max_scan_key_num;
 
         constexpr size_t MAX_STEP_SIZE = 1 << 20;
         // When the step size is too large, the range is easy to not really 
contain data.
-        if (step_size > MAX_STEP_SIZE) {
+        if (step_size_may_overflow > MAX_STEP_SIZE) {
             return no_split();
         }
-        size_t real_step_size = 0;
+        int step_size = static_cast<int>(step_size_may_overflow);

Review Comment:
   cast_set<> 



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