[
https://issues.apache.org/jira/browse/HIVE-10607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14527673#comment-14527673
]
Ashutosh Chauhan commented on HIVE-10607:
-----------------------------------------
Cursory analysis informs me that limit pushdown optimization from reducer to
mapper was written with MR style execution in mind where reducer cant have more
than one group by operator in its pipeline. Tez can run multiple group-by in
its reducer breaks some of the assumption of limit pushdown optimization. In
particular, that group by is getting its record from all mappers, whereas
second GBY operator of reducer in Tez is only receiving its input from its
parent reducer.
I think we shouldn't push limits from reducer to mapper, if in Tez, reducer has
more than 1 GBY in its pipeline. I am not sure if this is sufficient or we need
to be more restrictive or less. Thoughts ?
> Combination of ReducesinkDedup + TopN optimization doesn't play well with Tez
> in some cases
> --------------------------------------------------------------------------------------------
>
> Key: HIVE-10607
> URL: https://issues.apache.org/jira/browse/HIVE-10607
> Project: Hive
> Issue Type: Bug
> Components: Logical Optimizer, Tez
> Affects Versions: 0.13.0, 0.14.0, 1.0.0, 1.1.0
> Reporter: Ashutosh Chauhan
>
> {code:sql}
> select ctinyint, count(cdouble) from (select ctinyint, cdouble from
> alltypesorc group by ctinyint, cdouble) t1 group by ctinyint order by
> ctinyint limit 20;
> {code}
> This gives different result set depending on which set of optimizations are
> on. In particular in .q test environment following two invocations will give
> you different result set:
> {code}
> * mvn test -Phadoop-2 -Dtest.output.overwrite=true
> -Dtest=TestMiniTezCliDriver -Dqfile=test.q
> -Dhive.optimize.reducededuplication.min.reducer=1
> -Dhive.limit.pushdown.memory.usage=0.3f
> * mvn test -Phadoop-2 -Dtest.output.overwrite=true
> -Dtest=TestMiniTezCliDriver -Dqfile=test.q
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)