[
https://issues.apache.org/jira/browse/TAJO-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14560706#comment-14560706
]
ASF GitHub Bot commented on TAJO-1553:
--------------------------------------
Github user jihoonson commented on the pull request:
https://github.com/apache/tajo/pull/583#issuecomment-105843248
I focused on improving the broadcast join planning in this patch. I
evaluated performance with an example query which Tajo cannot fully exploit the
broadcast join opportunity.
### Query
```
default> select r_name, case when l_shipmode is null then 'N/O' else
l_shipmode end as s1 from region inner join ( select * from lineitem left outer
join nation on l_suppkey = n_nationkey ) t on n_regionkey = r_regionkey
```
### Data
* Input: TPC-H scale factor of 100
* Result: 14484 rows (185.7 KiB)
### Performance
* Before patch: 226.915 sec
* After patch: 49.647 sec
### Query plan
##### Before patch
```
-------------------------------------------------------------------------------
Execution Block Graph (TERMINAL - eb_1432720176114_0001_000006)
-------------------------------------------------------------------------------
|-eb_1432720176114_0001_000006
|-eb_1432720176114_0001_000005
|-eb_1432720176114_0001_000004
|-eb_1432720176114_0001_000001
-------------------------------------------------------------------------------
Order of Execution
-------------------------------------------------------------------------------
1: eb_1432720176114_0001_000001
2: eb_1432720176114_0001_000004
3: eb_1432720176114_0001_000005
4: eb_1432720176114_0001_000006
-------------------------------------------------------------------------------
=======================================================
Block Id: eb_1432720176114_0001_000001 [LEAF]
=======================================================
[Outgoing]
[q_1432720176114_0001] 1 => 5 (type=HASH_SHUFFLE,
key=tpch100.region.r_regionkey (INT8), num=1186)
SCAN(0) on tpch100.region
=> target list: tpch100.region.r_name (TEXT), tpch100.region.r_regionkey
(INT8)
=> out schema: {(2) tpch100.region.r_name (TEXT),
tpch100.region.r_regionkey (INT8)}
=> in schema: {(3) tpch100.region.r_regionkey (INT8),
tpch100.region.r_name (TEXT), tpch100.region.r_comment (TEXT)}
=======================================================
Block Id: eb_1432720176114_0001_000004 [LEAF]
=======================================================
[Outgoing]
[q_1432720176114_0001] 4 => 5 (type=HASH_SHUFFLE, key=tpch100.t.n_regionkey
(INT8), num=1186)
[Enforcers]
0: type=Broadcast, tables=tpch100.nation
TABLE_SUBQUERY(5) as tpch100.t
=> Targets: CASE WHEN tpch100.t.l_shipmode (TEXT) IS NULL THEN N/O ELSE
tpch100.t.l_shipmode (TEXT) END as s1, tpch100.t.n_regionkey (INT8)
=> out schema: {(2) s1 (TEXT), tpch100.t.n_regionkey (INT8)}
=> in schema: {(20) tpch100.t.l_orderkey (INT8), tpch100.t.l_partkey
(INT8), tpch100.t.l_suppkey (INT8), tpch100.t.l_linenumber (INT8),
tpch100.t.l_quantity (FLOAT8), tpch100.t.l_extendedprice (FLOAT8),
tpch100.t.l_discount (FLOAT8), tpch100.t.l_tax (FLOAT8), tpch100.t.l_returnflag
(TEXT), tpch100.t.l_linestatus (TEXT), tpch100.t.l_shipdate (TEXT),
tpch100.t.l_commitdate (TEXT), tpch100.t.l_receiptdate (TEXT),
tpch100.t.l_shipinstruct (TEXT), tpch100.t.l_shipmode (TEXT),
tpch100.t.l_comment (TEXT), tpch100.t.n_nationkey (INT8), tpch100.t.n_name
(TEXT), tpch100.t.n_regionkey (INT8), tpch100.t.n_comment (TEXT)}
PROJECTION(4)
=> Targets: tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)
=> out schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
=> in schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
JOIN(9)(LEFT_OUTER)
=> Join Cond: tpch100.lineitem.l_suppkey (INT8) =
tpch100.nation.n_nationkey (INT8)
=> target list: tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)
=> out schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
=> in schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
SCAN(2) on tpch100.nation
=> target list: tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)
=> out schema: {(4) tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
=> in schema: {(4) tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
SCAN(1) on tpch100.lineitem
=> target list: tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT)
=> out schema: {(16) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT)}
=> in schema: {(16) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT)}
=======================================================
Block Id: eb_1432720176114_0001_000005 [ROOT]
=======================================================
[Incoming]
[q_1432720176114_0001] 1 => 5 (type=HASH_SHUFFLE,
key=tpch100.region.r_regionkey (INT8), num=1186)
[q_1432720176114_0001] 4 => 5 (type=HASH_SHUFFLE, key=tpch100.t.n_regionkey
(INT8), num=1186)
JOIN(10)(INNER)
=> Join Cond: tpch100.t.n_regionkey (INT8) = tpch100.region.r_regionkey
(INT8)
=> target list: tpch100.region.r_name (TEXT), s1 (TEXT)
=> out schema: {(2) tpch100.region.r_name (TEXT), s1 (TEXT)}
=> in schema: {(4) tpch100.region.r_name (TEXT),
tpch100.region.r_regionkey (INT8), s1 (TEXT), tpch100.t.n_regionkey (INT8)}
SCAN(13) on eb_1432720176114_0001_000004
=> out schema: {(2) s1 (TEXT), tpch100.t.n_regionkey (INT8)}
=> in schema: {(2) s1 (TEXT), tpch100.t.n_regionkey (INT8)}
SCAN(12) on eb_1432720176114_0001_000001
=> out schema: {(2) tpch100.region.r_name (TEXT),
tpch100.region.r_regionkey (INT8)}
=> in schema: {(2) tpch100.region.r_name (TEXT),
tpch100.region.r_regionkey (INT8)}
=======================================================
Block Id: eb_1432720176114_0001_000006 [TERMINAL]
=======================================================
```
##### After patch
```
-------------------------------------------------------------------------------
Execution Block Graph (TERMINAL - eb_1432719753330_0002_000006)
-------------------------------------------------------------------------------
|-eb_1432719753330_0002_000006
|-eb_1432719753330_0002_000005
-------------------------------------------------------------------------------
Order of Execution
-------------------------------------------------------------------------------
1: eb_1432719753330_0002_000005
2: eb_1432719753330_0002_000006
-------------------------------------------------------------------------------
=======================================================
Block Id: eb_1432719753330_0002_000005 [ROOT]
=======================================================
[Enforcers]
0: type=Broadcast, tables=tpch100.region
1: type=Broadcast, tables=tpch100.nation
JOIN(10)(INNER)
=> Join Cond: tpch100.t.n_regionkey (INT8) = tpch100.region.r_regionkey
(INT8)
=> target list: tpch100.region.r_name (TEXT), s1 (TEXT)
=> out schema: {(2) tpch100.region.r_name (TEXT), s1 (TEXT)}
=> in schema: {(4) tpch100.region.r_name (TEXT),
tpch100.region.r_regionkey (INT8), s1 (TEXT), tpch100.t.n_regionkey (INT8)}
TABLE_SUBQUERY(5) as tpch100.t
=> Targets: CASE WHEN tpch100.t.l_shipmode (TEXT) IS NULL THEN N/O
ELSE tpch100.t.l_shipmode (TEXT) END as s1, tpch100.t.n_regionkey (INT8)
=> out schema: {(2) s1 (TEXT), tpch100.t.n_regionkey (INT8)}
=> in schema: {(20) tpch100.t.l_orderkey (INT8), tpch100.t.l_partkey
(INT8), tpch100.t.l_suppkey (INT8), tpch100.t.l_linenumber (INT8),
tpch100.t.l_quantity (FLOAT8), tpch100.t.l_extendedprice (FLOAT8),
tpch100.t.l_discount (FLOAT8), tpch100.t.l_tax (FLOAT8), tpch100.t.l_returnflag
(TEXT), tpch100.t.l_linestatus (TEXT), tpch100.t.l_shipdate (TEXT),
tpch100.t.l_commitdate (TEXT), tpch100.t.l_receiptdate (TEXT),
tpch100.t.l_shipinstruct (TEXT), tpch100.t.l_shipmode (TEXT),
tpch100.t.l_comment (TEXT), tpch100.t.n_nationkey (INT8), tpch100.t.n_name
(TEXT), tpch100.t.n_regionkey (INT8), tpch100.t.n_comment (TEXT)}
PROJECTION(4)
=> Targets: tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)
=> out schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
=> in schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
JOIN(9)(LEFT_OUTER)
=> Join Cond: tpch100.lineitem.l_suppkey (INT8) =
tpch100.nation.n_nationkey (INT8)
=> target list: tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)
=> out schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
=> in schema: {(20) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT), tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
SCAN(2) on tpch100.nation
=> target list: tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)
=> out schema: {(4) tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
=> in schema: {(4) tpch100.nation.n_nationkey (INT8),
tpch100.nation.n_name (TEXT), tpch100.nation.n_regionkey (INT8),
tpch100.nation.n_comment (TEXT)}
SCAN(1) on tpch100.lineitem
=> target list: tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT)
=> out schema: {(16) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT)}
=> in schema: {(16) tpch100.lineitem.l_orderkey (INT8),
tpch100.lineitem.l_partkey (INT8), tpch100.lineitem.l_suppkey (INT8),
tpch100.lineitem.l_linenumber (INT8), tpch100.lineitem.l_quantity (FLOAT8),
tpch100.lineitem.l_extendedprice (FLOAT8), tpch100.lineitem.l_discount
(FLOAT8), tpch100.lineitem.l_tax (FLOAT8), tpch100.lineitem.l_returnflag
(TEXT), tpch100.lineitem.l_linestatus (TEXT), tpch100.lineitem.l_shipdate
(TEXT), tpch100.lineitem.l_commitdate (TEXT), tpch100.lineitem.l_receiptdate
(TEXT), tpch100.lineitem.l_shipinstruct (TEXT), tpch100.lineitem.l_shipmode
(TEXT), tpch100.lineitem.l_comment (TEXT)}
SCAN(0) on tpch100.region
=> target list: tpch100.region.r_name (TEXT),
tpch100.region.r_regionkey (INT8)
=> out schema: {(2) tpch100.region.r_name (TEXT),
tpch100.region.r_regionkey (INT8)}
=> in schema: {(3) tpch100.region.r_regionkey (INT8),
tpch100.region.r_name (TEXT), tpch100.region.r_comment (TEXT)}
=======================================================
Block Id: eb_1432719753330_0002_000006 [TERMINAL]
=======================================================
```
> Improve broadcast join planning
> -------------------------------
>
> Key: TAJO-1553
> URL: https://issues.apache.org/jira/browse/TAJO-1553
> Project: Tajo
> Issue Type: Improvement
> Components: distributed query plan, planner/optimizer
> Reporter: Jihoon Son
> Assignee: Jihoon Son
> Fix For: 0.11.0
>
>
> The global engine generates a logical plan, and then marks some parts of the
> plan as broadcast plan which means that they and their input will be
> broadcasted to all workers.
> Currently, broadcast parts are identified according to some rigid and
> hard-coded rules. This will limit the broadcast opportunities in many cases.
> So, in this issue, I propose refactoring the broadcast planner to be more
> general.
> Broadcast parts can be identified recursively.
> * A leaf node will be broadcasted if its input size does not exceed the
> pre-defined threshold.
> * An intermediate node will be broadcasted if it has at least one broadcast
> child.
> * For outer joins, row-preserved tables must not be broadcasted to avoid
> input data duplication.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)