Hyoungjun Kim created TAJO-1102:
-----------------------------------
Summary: Self-join with a partitioned table returns wrong result
data.
Key: TAJO-1102
URL: https://issues.apache.org/jira/browse/TAJO-1102
Project: Tajo
Issue Type: Bug
Reporter: Hyoungjun Kim
Assignee: Hyoungjun Kim
Priority: Minor
See the following case.
{code:sql}
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);
{code}
{code:sql}
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;
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)