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_r334449826
 
 

 ##########
 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) =>
       val inputs = new mutable.ArrayBuffer[AnyRef]()
       rexCall.getOperands.foreach {
-        case pythonRexCall: RexCall if 
pythonRexCall.getOperator.asInstanceOf[ScalarSqlFunction]
-          .getScalarFunction.getLanguage == FunctionLanguage.PYTHON =>
+        case pythonRexCall: RexCall if isPythonFunction(
 
 Review comment:
   Same, we can remove the if statement here.

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