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

Self-join with a partitioned table returns wrong result data.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.9.0
    • 0.9.0
    • Planner/Optimizer
    • None

    Description

      See the following case.

      CREATE TABLE orders_partition
      (o_orderkey INT8, o_custkey INT8, o_totalprice FLOAT8, o_orderpriority TEXT,
        o_clerk TEXT, o_shippriority INT4, o_comment TEXT) USING CSV WITH ('csvfile.delimiter'='|')
      PARTITION BY COLUMN(o_orderdate TEXT, o_orderstatus TEXT);
      
      select a.o_orderstatus, count(*) as cnt
      from orders_partition a
      inner join orders_partition b
      on a.o_orderdate = b.o_orderdate
          and a.o_orderstatus = b.o_orderstatus
          and a.o_orderkey = b.o_orderkey
      where a.o_orderdate='1995-02-21'
      and a.o_orderstatus in ('F')
      group by a.o_orderstatus;
      

      Because of the where condition (where a.o_orderdate='1995-02-21 and a.o_orderstatus in ('F')), orders_partition table aliased 'a' is small and broadcast target table.
      In this case GlobalPlanner can't resolve which table is partitioned table.

      Attachments

        Activity

          People

            hjkim Hyoungjun Kim
            hjkim Hyoungjun Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: