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

CTAS PARTITION BY with UNION can cause invalid global plan

    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_2.patch
          33 kB
          Hyunsik Choi
        2. TAJO-560.patch
          33 kB
          Hyunsik Choi

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: