Github user clarkyzl commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3389#discussion_r103369181
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
 ---
    @@ -140,6 +138,24 @@ object UserDefinedFunctionUtils {
               s"one method named 'eval' which is public, not abstract and " +
               s"(in case of table functions) not static.")
         } else {
    +      var trailingSeq = false
    +      var noVargs = true
    +      methods.foreach(method => {
    +        val signatures = method.getParameterTypes
    +        if (signatures.nonEmpty) {
    +          if (method.isVarArgs) {
    +            noVargs = false
    +          } else if 
(signatures.last.getName.equals("scala.collection.Seq")) {
    +            trailingSeq = true
    +          }
    +        }
    +      })
    +      if (trailingSeq && noVargs) {
    +        // We found trailing "scala.collection.Seq", but no trailing 
"Type[]", "Type..."
    +        throw new ValidationException("The 'eval' method do not support 
Scala type of " +
    --- End diff --
    
    I think one of the important thing here is to check type by type.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to