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

Aggregation on a derived table which includes union can cause incorrect result

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.11.0, 0.11.1
    • Fix Version/s: 0.12.0, 0.11.2
    • Component/s: distributed query plan
    • Labels:
      None

      Description

      This problem can be reproduced by running the following query on 10GB TPC-H data set.

      select 
        sum(t.cnt) as cnt, o_orderkey, o_custkey 
      from 
        (
          select 
            o_orderkey, o_custkey, CAST(COUNT(1) AS INT4) as cnt 
          from 
            orders 
          group by 
            o_orderkey, o_custkey 
          union all 
          select 
            o_orderkey, o_custkey, o_shippriority 
          from 
            orders
        ) as t 
      group by 
        o_orderkey, o_custkey
      

        Attachments

          Activity

            People

            • Assignee:
              jihoonson Jihoon Son
              Reporter:
              jihoonson Jihoon Son
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: