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

CTAS PARTITION BY with UNION can cause invalid global plan

    XMLWordPrintableJSON

Details

    Description

      Take a look at the following query. This kind of queries can cause invalid distributed plans.

      create table testCtasWithUnion (col1 int4, col2 int4) partition by column(key float8) as
      
      select
        *
      from (
      
      select
        sum(l_orderkey) as total1,
        avg(l_partkey) as total2,
        l_quantity as key
      from
        lineitem
      group by
        l_quantity
      order by
        l_quantity
      limit
        3
      
      union
      
      select
        sum(l_orderkey) as total1,
        avg(l_partkey) as total2,
        l_quantity as key
      from
        lineitem
      group by
        l_quantity
      order by
        l_quantity
      limit
        3
      
      ) t1;
      

      Attachments

        1. TAJO-560.patch
          33 kB
          Hyunsik Choi
        2. TAJO-560_2.patch
          33 kB
          Hyunsik Choi

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: