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_r334449727
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/CommonPythonCalc.scala
 ##########
 @@ -49,11 +49,11 @@ trait CommonPythonCalc {
   private[flink] def createPythonScalarFunctionInfo(
       rexCall: RexCall,
       inputNodes: mutable.Map[RexNode, Integer]): PythonFunctionInfo = 
rexCall.getOperator match {
-    case sfc: ScalarSqlFunction if sfc.getScalarFunction.getLanguage == 
FunctionLanguage.PYTHON =>
+    case sfc: ScalarSqlFunction if isPythonFunction(sfc.getScalarFunction) =>
 
 Review comment:
   We can remove the if statement here, as the rexCall is always a call 
contains python function.
   Would be great if you can also add some comments here that saying that the 
rexCall is always a call contains python function.

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