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

Constant folding case NULL equality

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.14.0, 1.0.0, 1.1.0
    • 1.2.0
    • Logical Optimizer
    • None

    Description

      Hive logical optimizer does not follow the Null scan codepath when encountering a NULL = 1;

      NULL = 1 is not evaluated as false in the constant propogation implementation.

      hive> explain select count(1) from store_sales where null=1;
      ...
                   TableScan
                        alias: store_sales
                        filterExpr: (null = 1) (type: boolean)
                        Statistics: Num rows: 550076554 Data size: 49570324480 Basic stats: COMPLETE Column stats: COMPLETE
                        Filter Operator
                          predicate: (null = 1) (type: boolean)
                          Statistics: Num rows: 275038277 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
      

      Attachments

        1. HIVE-9645.patch
          8 kB
          Ashutosh Chauhan
        2. HIVE-9645.1.patch
          66 kB
          Ashutosh Chauhan
        3. HIVE-9645.2.patch
          72 kB
          Ashutosh Chauhan
        4. HIVE-9645.3.patch
          73 kB
          Ashutosh Chauhan
        5. HIVE-9645.4.patch
          89 kB
          Ashutosh Chauhan
        6. HIVE-9645.5.patch
          88 kB
          Ashutosh Chauhan
        7. HIVE-9645.6.patch
          90 kB
          Ashutosh Chauhan
        8. HIVE-9645.7.patch
          108 kB
          Ashutosh Chauhan

        Issue Links

          Activity

            People

              ashutoshc Ashutosh Chauhan
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: