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

    https://github.com/apache/flink/pull/3389#discussion_r102483144
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/ScalarSqlFunction.scala
 ---
    @@ -136,8 +136,18 @@ object ScalarSqlFunction {
           }
     
           override def getOperandCountRange: SqlOperandCountRange = {
    -        val signatureLengths = signatures.map(_.length)
    -        SqlOperandCountRanges.between(signatureLengths.min, 
signatureLengths.max)
    +        var min = 255
    +        var max = -1
    +        signatures.foreach(sig => {
    +          var len = sig.length
    +          if (len > 0 && sig(sig.length -1).isArray) {
    +            max = 254  // according to JVM spec 4.3.3
    --- End diff --
    
    Hi @wuchong . Yes, according to JVM specification. It may have 255 
parameters, if the method is static. If the method is not static, the pointer 
"this" will be one of the parameters, so it is 254.
    
    FYI, 
http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.3.3


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to