[
https://issues.apache.org/jira/browse/HIVE-4386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Navis resolved HIVE-4386.
-------------------------
Resolution: Duplicate
This is fixed by HIVE-2955. Feel free to reopen if it happens again.
> max() and min() return NULL on partition column; distinct() returns nothing
> ---------------------------------------------------------------------------
>
> Key: HIVE-4386
> URL: https://issues.apache.org/jira/browse/HIVE-4386
> Project: Hive
> Issue Type: Bug
> Components: UDF
> Affects Versions: 0.8.1
> Reporter: Robin Morris
>
> partitioned_table is partitioned on year, month, day.
> > select max(day) from partitioned_table where year=2013 and month=4;
> spins up zero mappers, one reducer, and returns NULL. Same for
> > select min(day) from ...
> > select distinct(day) from... returns nothing at all.
> Using an explicit intermediate table does work:
> > create table foo_max as select day from partitioned_table where year=2013
> > and month=4;
> > select max(day) from foo_max; drop table foo_max;
> Several map-reduce jobs later, the correct answer is given.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)