Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-891

Complex join conditions with UNION or inline should be supported

    Details

      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;
      

        Attachments

          Activity

            People

            • Assignee:
              hyunsik Hyunsik Choi
              Reporter:
              hyunsik Hyunsik Choi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: