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 `isPythonFunction` flag, do you mean that we can remove the flag 
and use two methods? one is `containsPythonFunction()`, the other is 
`containsNonPythonFunction()`? 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to