Jaehwa Jung created TAJO-741:
--------------------------------
Summary: ProjectionPushDown removes join conditions.
Key: TAJO-741
URL: https://issues.apache.org/jira/browse/TAJO-741
Project: Tajo
Issue Type: Bug
Components: distributed query plan
Reporter: Jaehwa Jung
Assignee: Jaehwa Jung
I found a bug for ProjectionPushDown as follows:
*1. Table Schema*
{code:xml}
create external table table1 (id int, name text, score float, type text) using
csv with ('csvfile.delimiter'='|') location
'hdfs://server01:9010/tajo/warehouse/table1' ;
create external table table3 (id int, name text, score float, type text) using
csv with ('csvfile.delimiter'='|') location
'hdfs://localhost:9010/tajo/warehouse/table3' ;
create external table table4 (id int, name text, score float, type text) using
csv with ('csvfile.delimiter'='|') location
'hdfs://localhost:9010/tajo/warehouse/table4' ;
{code}
*2. Table Data*
{code:xml}
2.1 table1
1|name1-1|1.1|a
2|name1-2|2.3|b
3|name1-3|3.4|c
4|name1-4|4.5|d
5|name1-5|5.6|e
2.2 table3
1|name3-1|0.1|a
2|name3-2|0.2|b
3|name3-3|0.3|b
2.3 table4
1|name4-1|22.3|a
2|name4-2|23.4|b
3|name4-3|24.5|cc
5|name4-4|25.6|ee
6|name4-5|31.1|ff
7|name4-6|32.3|gg
{code}
*3. Query*
select a.name, c.name, a.type, c.type from table1 a join table3 b on (a.id =
b.id) join table4 c on (b.id = c.id) where a.type = c.type;
*4. Expected Result*
{code:xml}
name, name, type, type
-------------------------------
name1-1, name4-1, a, a
name1-2, name4-2, b, b
{code}
*5. Active Result*
{code:xml}
name, name, type, type
-------------------------------
name1-1, name4-1, a, a
name1-2, name4-2, b, b
name1-3, name4-3, c, cc
{code}
I found that _default.a.type (TEXT) = default.c.type (TEXT)_ is in initiative
plan result and FPD result. But after executing ProjectionPushDown, it
disappeared in logical plan. I think that ProjectionPushDown just can recognize
just one join condition.
--
This message was sent by Atlassian JIRA
(v6.2#6252)