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_r334441188
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/utils/PythonUtil.scala
 ##########
 @@ -65,4 +75,12 @@ object PythonUtil {
       actualLanguage == expectedLanguage ||
         (recursive && call.getOperands.exists(_.accept(this)))
   }
+
+  /**
+    * Categorizes the language of a user-defined function.
+    */
+  object FunctionLanguage extends Enumeration {
 
 Review comment:
   I think we don't need the `FunctionLanguage`, instead, we can use a boolean 
to indicate whether to find python function or non-python function. For 
example, the code looks like:
   
   ```
     /**
       * Find python function or non-python function.
       */
     def findFunction(
       node: RexNode,
       findPythonFunction: Boolean,
       recursive: Boolean = true): Boolean = {
       node.accept(new FunctionFinderNew(findPythonFunction, recursive))
     }
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to