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

ArrayIndexOutOfBoundsException on "on not exists" or "on exists"

    XMLWordPrintableJSON

Details

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

    Description

      Execute this SQL

      select Header.Name from ( VALUES (1, 'A'), (2, 'B')) as Header(Id, Name) join (values (11, 1), (12, 1), (21, 2)) as Version(Id, Parent) on not exists (select 1 from (values (11, 1), (12, 1), (21, 2)) as Version2(Id, Parent) where Version2.Parent = Header.Id and Version2.Id > Version.Id) 

       

      Expected result

      A ResultSet containing this

      NAME
      A
      A
      B

       

      Actual result

      ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mamo Magnus Mogren
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: