Github user sunjincheng121 commented on a diff in the pull request: https://github.com/apache/flink/pull/3791#discussion_r113833504 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala --- @@ -107,6 +107,11 @@ abstract class TableEnvironment(val config: TableConfig) { // registered external catalog names -> catalog private val externalCatalogs = new HashMap[String, ExternalCatalog] + private lazy val tableFunctionParser = new TableFunctionParser(this) + + // the method for converting a udtf String to Table for Java API + final def tableApply(udtf: String): Table = tableFunctionParser(udtf) --- End diff -- `TableFunctionParser` only has one method named `apply`. IMO. It's a util method. So here are 3 suggestions: * If a class only contains util methods, I suggest change `class` to `object`, And tableEnv can be a param of method. * If `TableFunctionParser#apply` only used for `TableFunction`, I suggest move `apply` method into `UserDefinedFunctionUtils` ,Because all of the functional methods of `UDF/UDTF/UDAF` in that file. * if the method only used for `TableEnvironment`.Whether it can be implemented internally in `TableEnvironment` ï¼ What do you think? @Xpray
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---