dynamobi/dynamobi — Issue #709: [FRG-163] field lookup reports error when joining a regular table with the result of a union
Author: dynamobi-build
Created: 2011-12-30 03:44:30+00:00
State: open
Labels: FRG, Sql2Rel

[reporter="rchen", created="Mon, 3 Jul 2006 12:30:30 -0500 (GMT-05:00)"]
create table t1 (a integer);

create table t2 (b integer);

create table t3 (c integer);

select * from (select * from t1 union select * from t2), t3;

Error: java.lang.AssertionError: Internal error: Type 'RecordType(INTEGER B)' has no field 'C' (state=,code=0)

Looking up T3.C failed. The problem is that

SqlToRelConverter->convertIdentifier->lookupExp(T3.C) returns T2.B.