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

StatsOptimizer should return no rows on empty table with group by

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.1.0, 1.2.0, 2.0.0, 2.1.0
    • 2.3.0
    • Logical Optimizer
    • None

    Description

      create table t1 (a int);
      analyze table t1 compute statistics;
      analyze table t1 compute statistics for columns;
      select count(1) from t1 group by 1;
      set hive.compute.query.using.stats=true;
      select count(1) from t1 group by 1;
      

      In both cases result set should be empty. However, with statsoptimizer on Hive returns one row with value 0.

      Attachments

        1. HIVE-13452.01.patch
          12 kB
          Pengcheng Xiong

        Issue Links

          Activity

            People

              pxiong Pengcheng Xiong
              ashutoshc Ashutosh Chauhan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: