[ 
https://issues.apache.org/jira/browse/ASTERIXDB-3311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wail Y. Alkowaileet resolved ASTERIXDB-3311.
--------------------------------------------
    Resolution: Fixed

> Outer join query fails with column storage
> ------------------------------------------
>
>                 Key: ASTERIXDB-3311
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3311
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler, STO - Storage
>    Affects Versions: 0.9.9
>            Reporter: Wail Y. Alkowaileet
>            Assignee: Wail Y. Alkowaileet
>            Priority: Major
>             Fix For: 0.9.9
>
>
> Following are the set of statements to reproduce the issue
> {noformat}create dataset ds1 primary key (id:int) WITH {"storage-format": 
> {"format": "column"}};
> create dataset ds2 primary key (id:int) WITH {"storage-format": {"format": 
> "column"}};
> insert into ds1 ({"id": 1, "a": 1, "b": 1 });
> insert into ds1 ({"id": 2, "a": 1, "b": 2 });
> insert into ds1 ({"id": 3, "a": 2, "b": 3 });
> insert into ds1 ({"id": 4, "a": 2, "b": 4 });
> insert into ds1 ({"id": 5, "a": 3, "b": 5 });
> insert into ds1 ({"id": 6, "a": 3, "b": 6 });
> insert into ds1 ({"id": 7, "a": 4, "b": 7 });
> insert into ds2 ({"id": 100, "x": 2, "y": 100 });
> insert into ds2 ({"id": 101, "x": 2, "y": 101 });
> insert into ds2 ({"id": 102, "x": 3, "y": 102 });
> create index idx_x on ds2(x:int);
> select ds1.b, ds2.y
> from ds1 left outer join ds2 on to_bigint(ds1.a) /* +indexnl */ = ds2.x
> order by ds1.b, ds2.y;{noformat}
> As reported by [~peeyushgupta1] 
>  
> There are two issues here:
> 1- The compiler doesn't push field accesses to left-outer-unnest-map leading 
> to arrayCopy failing.
> 2- Columnar LSM cursors cannot read the same tuple twice. With index nested 
> loop joins, this could happen. As a result, the tuple projector should return 
> the previously assembled record without advancing the column readers.



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

Reply via email to