Query failed : Exception: No more data to read


#1

While MAPD doesn’t claim to support lateral derived tables, this statement does not result in a parser error stating that fact. Instead you get Exception: No more data to read.

select tjoin1.rnum, tjoin1.c1, tjoin2.c1 as c1j2, tjoin2.c2 from tjoin1, lateral ( select tjoin2.c1, tjoin2.c2 from tjoin2 where tjoin1.c1=tjoin2.c1) tjoin2

Error: Query failed : Exception: No more data to read.
SQLState: null
ErrorCode: 0

create table TJOIN1 ( RNUM integer not null , C1 integer, C2 integer);
insert into TJOIN1 ( RNUM, C1, C2) values ( 0, 10, 15);
insert into TJOIN1 ( RNUM, C1, C2) values ( 1, 20, 25);
insert into TJOIN1 ( RNUM, C1, C2) values ( 2, NULL, 50);

create table TJOIN2 ( RNUM integer not null , C1 integer, C2 varchar(2));
insert into TJOIN2 ( RNUM, C1, C2) values ( 0, 10, ‘BB’);
insert into TJOIN2 ( RNUM, C1, C2) values ( 1, 15, ‘DD’);
insert into TJOIN2 ( RNUM, C1, C2) values ( 2, NULL, ‘EE’);
insert into TJOIN2 ( RNUM, C1, C2) values ( 3, 10, ‘FF’);


#2

Hi,

This is similar to the TRIM issue #171. We are not rejecting the unsupported syntax.

There is already an internal issue for Lateral ,so should be resolved soon

regards