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


##########
be/src/exprs/function/function.cpp:
##########
@@ -195,16 +206,21 @@ Status 
PreparedFunctionImpl::default_implementation_for_nulls(
         return Status::OK();
     }
 
-    if (std::ranges::any_of(args, [&block](const auto& elem) {
-            return block.get_by_position(elem).column->only_null();
+    if (!has_nullable_argument_type(block, args)) {
+        return Status::OK();
+    }
+
+    auto nullable_column_infos = build_nullable_column_infos(block, args);

Review Comment:
   [P2] Preserve the all-NULL short circuit across arguments
   
   `build_nullable_column_infos()` populates every nullable argument before 
this all-NULL check. For a call such as `add(NULL, large_nullable_col)` (or a 
non-const all-NULL first column), the previous `any_of(args, only_null())` 
returned after the first argument, but this path now runs `count_zero_num()` 
over every later null map even though the result is already known to be a NULL 
constant. This is distinct from the existing per-map early-exit thread: a 
faster predicate scan would still be invoked for arguments that should never be 
inspected. Please collect/check metadata sequentially and stop as soon as an 
all-NULL argument is found.
   



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