prestodb / sql

A Modern SQL frontend based on SQL16 with extensions for streaming, graph, rich types, etc, including parser, resolver, rewriters, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distinguish between partitioning for join vs agg

kaikalur opened this issue · comments

If I have a query:

T1
JOIN T2 ON T1.k1 = T2.k1
JOIN T3 ON T1.k2 = T2.k2
GROUP BY k2

Then even if T3 is tiny, we always seem to be doing partitioned join for k2. This is undesirable. Being able to broadcast should override reusing partitioning (maybe CBO?).

@mlyublena @feilong-liu