wuchong commented on a change in pull request #10039: [FLINK-14262][table]  
Support referencing function with fully/partially qualified names in SQL
URL: https://github.com/apache/flink/pull/10039#discussion_r342388213
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/functions/utils/ScalarSqlFunction.scala
 ##########
 @@ -45,13 +44,13 @@ import scala.collection.JavaConverters._
   * @param typeFactory    type factory for converting Flink's between 
Calcite's types
   */
 class ScalarSqlFunction(
-    name: String,
+    name: SqlIdentifier,
 
 Review comment:
   I would suggest to use `FunctionIdentifier` as the name parameter. 
   1)`FunctionIdentifier` is a more strict interface, either 3-part full path 
(UDF), or 1-part name (built-in).
   2) `FunctionIdentifier` has a better utility to constuct, rather than using 
`SqlParserPos.ZERO` here and there. 
   3)  the constructor of `ScalarSqlFunction` is not only from SQL path, but 
also Table API path, but it is weird to construct a `SqlIdentifier` in Table 
API path. 
   
   The same to `TableSqlFunction`, `AggregateSqlFunction`, etc...
   
   What do you think?

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