You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zhangstar333 (via GitHub)" <gi...@apache.org> on 2023/06/06 02:13:08 UTC

[GitHub] [doris] zhangstar333 commented on a diff in pull request #20282: [refactor](functions) Check ReturnType of functions on FE

zhangstar333 commented on code in PR #20282:
URL: https://github.com/apache/doris/pull/20282#discussion_r1218784192


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java:
##########
@@ -2047,15 +2048,29 @@ protected boolean isConstantImpl() {
         }
 
         final String fnName = this.fnName.getFunction();
+
+        if (isConstantForSpecialCases(fnName)) {
+            return true;
+        }
         // Non-deterministic functions are never constant.
         if (isNondeterministicBuiltinFnName(fnName)) {
             return false;
         }
-        // Sleep is a special function for testing.
+        // specially decide some functions.
         if (fnName.equalsIgnoreCase("sleep")) {
             return false;
         }
-        return super.isConstantImpl();
+
+        return super.isConstantImpl(); // True as default.

Review Comment:
   here seems has no relationship between result nullable and children nullable,



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org