flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] hequn8128 commented on a change in pull request #9894: [FLINK-14342][table][python] Remove method FunctionDefinition#getLanguage.
Date Fri, 18 Oct 2019 01:38:09 GMT
hequn8128 commented on a change in pull request #9894: [FLINK-14342][table][python] Remove
method FunctionDefinition#getLanguage.
URL: https://github.com/apache/flink/pull/9894#discussion_r336289816
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/ExpressionReducer.scala
 ##########
 @@ -68,7 +68,7 @@ class ExpressionReducer(
 
       // Skip expressions that contain python functions because it's quite expensive to
       // call Python UDFs during optimization phase. They will be optimized during the runtime.
-      case (_, e) if PythonUtil.containsFunctionOf(e, FunctionLanguage.PYTHON) =>
+      case (_, e) if PythonUtil.containsFunctionOf(e, findPythonFunction = true) =>
 
 Review comment:
   Thanks a lot for the suggestion. The contains is used here because this method will also
check the inputs of this RexNode, i.e., whether the rexCall tree contains python or non-python
functions, so maybe contains is better than is?
   
   As for the `findPythonFunction` flag, do you mean that we can remove the flag and use two
methods? one is `containsPythonFunction()`, the other is `containsNonPythonFunction()`? We
will check both conditions in the `PythonScalarFunctionSplitRule`.

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

Mime
View raw message