[ 
https://issues.apache.org/jira/browse/CALCITE-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16783438#comment-16783438
 ] 

Stamatis Zampetakis commented on CALCITE-2889:
----------------------------------------------

Thanks for catching this [~amaliujia]! Can you change the summary of this issue 
to better illustrate when does IndexOutOfBoundsException appear. For instance 
"IndexOutOfBoundsException in EnumUtils#fromInternal when handling methods with 
varargs" or something similar.

> EnumUtils's fromInternal cannot handle function with variable length argument 
> ------------------------------------------------------------------------------
>
>                 Key: CALCITE-2889
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2889
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Rui Wang
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java#L210
> If "targetTypes" is from "method.getParameterTypes()" and if method's 
> signature is "func(stirng ... args)", then "targetTypes" will contain one 
> type "String[].class", but "expressions" could contain one than one element, 
> so it throws IndexOutOfBoundsException.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to