Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Please see the following two example queries. Currently, they will cause planning exception. This patch fixes the bugs.
select n1.n_nationkey, substr(n1.n_name, 1, 4) name1, substr(n2.n_name, 1, 4) name2 from nation n1 join (select * from nation) n2 on substr(n1.n_name, 1, 4) = substr(n2.n_name, 1, 4) order by n1.n_nationkey;
select n1.n_nationkey, substr(n1.n_name, 1, 4) name1, substr(n2.n_name, 1, 4) name2 from nation n1 join (select * from nation union select * from nation) n2 on substr(n1.n_name, 1, 4) = substr(n2.n_name, 1, 4) order by n1.n_nationkey;