You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/02/16 09:59:16 UTC

[GitHub] [incubator-doris] morningman opened a new pull request #2914: [UDF] Fix bug that UDF can't handle constant null value

morningman opened a new pull request #2914: [UDF] Fix bug that UDF can't handle constant null value
URL: https://github.com/apache/incubator-doris/pull/2914
 
 
   This CL modify the `evalExpr()` of `ExpressionFunctions`, so that it won't change the
   `FunctionCallExpr` to `NullLiteral` when there is null parameter in UDF. Which will fix the 
   problem described in ISSUE: #2913

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] morningman merged pull request #2914: [UDF] Fix bug that UDF can't handle constant null value

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #2914: [UDF] Fix bug that UDF can't handle constant null value
URL: https://github.com/apache/incubator-doris/pull/2914
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #2914: [UDF] Fix bug that UDF can't handle constant null value

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #2914: [UDF] Fix bug that UDF can't handle constant null value
URL: https://github.com/apache/incubator-doris/pull/2914#discussion_r379898235
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
 ##########
 @@ -144,15 +145,6 @@ private synchronized void registerFunctions() {
             }
         }
         this.functions = mapBuilder.build();
-
-        // Functions that need to handle null.
-        ImmutableSet.Builder<String> setBuilder =
-                new ImmutableSet.Builder<String>();
-        setBuilder.add("if");
-        setBuilder.add("hll_hash");
-        setBuilder.add("concat_ws");
-        setBuilder.add("ifnull");
-        this.nonNullResultWithNullParamFunctions = setBuilder.build();
 
 Review comment:
   Why move this to `gensrc/script/doris_builtins_functions.py`?  what's the advantage?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] morningman commented on a change in pull request #2914: [UDF] Fix bug that UDF can't handle constant null value

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #2914: [UDF] Fix bug that UDF can't handle constant null value
URL: https://github.com/apache/incubator-doris/pull/2914#discussion_r379900376
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
 ##########
 @@ -144,15 +145,6 @@ private synchronized void registerFunctions() {
             }
         }
         this.functions = mapBuilder.build();
-
-        // Functions that need to handle null.
-        ImmutableSet.Builder<String> setBuilder =
-                new ImmutableSet.Builder<String>();
-        setBuilder.add("if");
-        setBuilder.add("hll_hash");
-        setBuilder.add("concat_ws");
-        setBuilder.add("ifnull");
-        this.nonNullResultWithNullParamFunctions = setBuilder.build();
 
 Review comment:
   The previous definition was hidden in `ExpressionFunctions`. If it weren't for this bug, I wouldn't even know that there is such a definition. So I decided to put this definition in `doris_builtins_functions.py`, so that if there are new builtin functions added later, they can be unified in `doris_builtins_functions.py` to define its behavior.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #2914: [UDF] Fix bug that UDF can't handle constant null value

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #2914: [UDF] Fix bug that UDF can't handle constant null value
URL: https://github.com/apache/incubator-doris/pull/2914#discussion_r379978549
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/ExpressionFunctions.java
 ##########
 @@ -144,15 +145,6 @@ private synchronized void registerFunctions() {
             }
         }
         this.functions = mapBuilder.build();
-
-        // Functions that need to handle null.
-        ImmutableSet.Builder<String> setBuilder =
-                new ImmutableSet.Builder<String>();
-        setBuilder.add("if");
-        setBuilder.add("hll_hash");
-        setBuilder.add("concat_ws");
-        setBuilder.add("ifnull");
-        this.nonNullResultWithNullParamFunctions = setBuilder.build();
 
 Review comment:
   I See.
   
   But if this change is only to make the `nonNullResultWithNullParamFunctions` definition Obviously. I think normal java class is better than python script, because current IDE is very powerful, we could very easily find the definition.
   
   Besides,I think if not performance reason, we shouldn't  use code gen.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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