Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4386

max() and min() return NULL on partition column; distinct() returns nothing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 0.8.1
    • None
    • UDF
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              robindmorris Robin Morris
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: