[ https://issues.apache.org/jira/browse/FLINK-14273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16941378#comment-16941378 ]
hailong wang commented on FLINK-14273: -------------------------------------- Thank you. Jark Wu, I had submit a PR, I appreciate if you have a look. > when User-Defined Aggregate Functions(UDAF) parameters are inconsistent with > the definition, the error reporting is confusing > ----------------------------------------------------------------------------------------------------------------------------- > > Key: FLINK-14273 > URL: https://issues.apache.org/jira/browse/FLINK-14273 > Project: Flink > Issue Type: Improvement > Components: Table SQL / Planner > Affects Versions: 1.9.0 > Reporter: hailong wang > Assignee: hailong wang > Priority: Critical > Labels: pull-request-available > Fix For: 1.10.0 > > Time Spent: 10m > Remaining Estimate: 0h > > When UDAF parameters are inconsistent with the definition of accumulate > method, all arguments to the accumulate method are listed in the error. But > the first argument of accumulate is accumulator, users don't have to care > when using SQL. > For example: > {code:java} > INSERT INTO Orders SELECT name, USERUDAF(id, name) FROM Orders GROUP BY > TUMBLE(rowTime, interval '10' second ), id, name > {code} > USERUDAF is a User-Defined Aggregate Functions, and accumulate is defined as > follow: > {code:java} > public void accumulate(Long acc, String a) {……} > {code} > At present, error is as follows: > {code:java} > Caused by: org.apache.flink.table.api.ValidationException: Given parameters > of function do not match any signature. > Actual: (java.lang.Integer, java.lang.String) > Expected: (java.lang.Integer, java.lang.String) > {code} > This error will mislead users, and the expected errors are as follows : > {code:java} > Caused by: org.apache.flink.table.api.ValidationException: Given parameters > of function do not match any signature. > Actual: (java.lang.Integer, java.lang.String) > Expected: (java.lang.String){code} -- This message was sent by Atlassian Jira (v8.3.4#803005)