Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2889

IndexOutOfBoundsException in EnumUtils#fromInternal when handling UDFs with varargs

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core

    Description

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            amaliujia Rui Wang

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4.5h
                4.5h

                Slack

                  Issue deployment