github-actions[bot] commented on code in PR #67981:
URL: https://github.com/apache/doris/pull/67981#discussion_r4017415050


##########
be/src/exprs/function/cast/cast_to_int.h:
##########
@@ -72,6 +72,11 @@ class CastToImpl<CastMode, FromDataType, ToDataType> : 
public CastToBase {
         CastParameters params;
         params.is_strict = (CastMode == CastModeType::StrictMode);
         for (size_t i = 0; i < input_rows_count; ++i) {
+            // The source value of a row marked as null by the input null map 
is a hidden
+            // payload and has no SQL semantics, so it must not be checked.
+            if (null_map && null_map[i]) {

Review Comment:
   [P2] Preserve the no-NULL fast path for nullable blocks
   
   `get_nullable_column_info()` has already scanned this source map and records 
`source_info.has_null`, but `prepare_remove_nullable` currently passes a 
non-null pointer for every Nullable input. As a result this new branch is 
executed for every row even on the common blocks whose map is all zero, across 
the integer, decimal, and strict datelike loops; that adds a load/branch to 
formerly straight-line numeric kernels after the same bitmap was already proven 
empty. Please pass `nullptr` when `source_info.has_null` is false (while 
preserving any separately inherited complex-parent mask), so only blocks that 
actually contain NULLs pay the row 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]

Reply via email to