You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Magnus Mogren (Jira)" <ji...@apache.org> on 2023/03/16 08:51:00 UTC

[jira] [Created] (CALCITE-5588) ArrayIndexOutOfBoundsException on select

Magnus Mogren created CALCITE-5588:
--------------------------------------

             Summary: ArrayIndexOutOfBoundsException on select
                 Key: CALCITE-5588
                 URL: https://issues.apache.org/jira/browse/CALCITE-5588
             Project: Calcite
          Issue Type: Bug
    Affects Versions: 1.33.0
            Reporter: Magnus Mogren


Execute this SQL
{code:java}
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) {code}
 

*Expected result*

A ResultSet containing this
|*NAME*|
|A|
|A|
|B|

 

*Actual result*

{color:#FF0000}ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)