wuchong commented on a change in pull request #9823: [FLINK-14273][Table]Add
accumulator type to actual type list in AggSqlFunction
URL: https://github.com/apache/flink/pull/9823#discussion_r331768610
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/functions/utils/UserDefinedFunctionUtils.scala
##########
@@ -701,6 +701,18 @@ object UserDefinedFunctionUtils {
getMethodSignatures(function, name).map(signatureToString).mkString(", ")
}
+ /**
+ * Prints the first signature of methods with given name in a class
+ * and one signature consisting of DataType.
+ */
+ def signaturesToString(signature: Seq[LogicalType],
+ function: UserDefinedFunction,
+ name: String): String = {
+ val signatureArray = getMethodSignatures(function, name)(0).head +:
Review comment:
The full signatures should be passed in as `signature` parameter. It's hack
to extract the first argument of UDF. We already know the accumulator type in
the context, we don't need to extract it from the UDF again.
----------------------------------------------------------------
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