godfreyhe commented on a change in pull request #13577:
URL: https://github.com/apache/flink/pull/13577#discussion_r507128455



##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/functions/utils/TableSqlFunction.scala
##########
@@ -40,12 +44,19 @@ class TableSqlFunction(
     functionImpl: FlinkTableFunctionImpl[_])
   extends SqlUserDefinedTableFunction(
     new SqlIdentifier(name, SqlParserPos.ZERO),
+    SqlKind.OTHER_FUNCTION,
     ReturnTypes.CURSOR,
     createEvalOperandTypeInference(name, tableFunction, typeFactory),
-    createEvalOperandTypeChecker(name, tableFunction),
-    null,
+    createEvalOperandMetadata(name, tableFunction),
     functionImpl) {
 
+  override def getRowTypeInference: SqlReturnTypeInference = new 
SqlReturnTypeInference {
+    override def inferReturnType(opBinding: SqlOperatorBinding): RelDataType = 
{
+      // The arguments should never be used.
+      functionImpl.getRowType(opBinding.getTypeFactory, 
Collections.emptyList())
+    }
+  }

Review comment:
       `TableSqlFunction` extends from `SqlUserDefinedTableFunction`, and 
`SqlUserDefinedTableFunction` has provided the default implementation




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


Reply via email to