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

Complex join conditions with UNION or inline should be supported

    XMLWordPrintableJSON

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

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

            Dates

              Created:
              Updated:
              Resolved: