englefly commented on code in PR #70100:
URL: https://github.com/apache/doris/pull/70100#discussion_r4666861213


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/NullToNonNullFunction.java:
##########
@@ -51,7 +50,7 @@ public interface NullToNonNullFunction {
      */
     static boolean canConvertNullToNonNull(Expression e) {
         return e instanceof NullToNonNullFunction
-                || (e instanceof AlwaysNotNullable
+                || ((e instanceof AlwaysNotNullable || (e instanceof 
ScalarFunction && e instanceof Udf))

Review Comment:
   Fixed in `8c5c62f9e36`.
   
   I checked the built-in scalar registrations against the BE NULL handling and 
marked 20 functions, including `array_position` and `make_set`. For 
`element_at`, the marker applies to Map lookup, which can match a stored NULL 
key. The preferred-projection rewrite now consults the same guard before moving 
an expression onto a null-generating join input.
   
   The RIGHT and FULL JOIN regressions use a constant array and a constant 
mask. They check that the unsafe scan filter is absent and that enabling or 
disabling TopN filtering produces the same results. The Map regression also 
checks an unmatched row with the filter disabled. The previous FE returned 
right key `0`; the fixed FE returns `1`.
   
   The FE build and Checkstyle passed, all 68 FE unit tests passed, and the SQL 
suite generated and then checked all 92 result expectations. The local SQL run 
used the rebuilt FE with the published 4.1.5 BE and disabled the FE local 
shuffle planner for compatibility.
   



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