Alex Behm has posted comments on this change.

Change subject: IMPALA-2502: don't redundantly repartition grouping aggregations
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/2414/4/testdata/workloads/functional-planner/queries/PlannerTest/aggregation.test
File testdata/workloads/functional-planner/queries/PlannerTest/aggregation.test:

Line 947: select straight_join count(distinct c_custkey)
> I'm not sure that I understand which slots and what would qualify as intere
By "interesting" expression I mean something that is not a SlotRef. Example:

select coalesce(t1.id, 123), count(*)
from t1 join t2
  on coalesce(t1.id, 123) = ifnull(t2.id, 20)
group by 1

or 

select ifnull(t2.id, 20), count(*)
from t1 join t2
  on coalesce(t1.id, 123) = ifnull(t2.id, 20)
group by 1

Ideally, we would be able to make both cases work, but I have a feeling only 
one of those variants will.

I'm not saying we need to fix this in this patch, but it might be good to try 
it out, maybe even file a follow-on JIRA. I think the join hoisting has a 
similar limitation.

You can imagine more tricky expressions with multiple slotrefs for which we 
cannot rely on our equivalence computation.


-- 
To view, visit http://gerrit.cloudera.org:8080/2414
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iffdcfd3629b8a69bd23915e1adba3b8323cbbaef
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to