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

Column stats : LOW_VALUE (or HIGH_VALUE) will always be 0.0000 ,if all the column values larger than 0.0 (or if all column values smaller than 0.0)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.0, 0.13.0
    • 0.14.0
    • Statistics
    • None

    Description

      if all column values larger than 0.0 DOUBLE_LOW_VALUE always will be 0.0
      or if all column values less than 0.0, DOUBLE_HIGH_VALUE will always be

      hive (default)> create table src_test (price double);
      hive (default)> load data local inpath './test.txt' into table src_test;
      hive (default)> select * from src_test;
      OK
      1.0
      2.0
      3.0
      Time taken: 0.313 seconds, Fetched: 3 row(s)
      hive (default)> analyze table src_test compute statistics for columns price;

      mysql> select * from TAB_COL_STATS \G;
      CS_ID: 16
      DB_NAME: default
      TABLE_NAME: src_test
      COLUMN_NAME: price
      COLUMN_TYPE: double
      TBL_ID: 2586
      LONG_LOW_VALUE: 0
      LONG_HIGH_VALUE: 0
      DOUBLE_LOW_VALUE: 0.0000 # Wrong Result ! Expected is 1.0000
      DOUBLE_HIGH_VALUE: 3.0000
      BIG_DECIMAL_LOW_VALUE: NULL
      BIG_DECIMAL_HIGH_VALUE: NULL
      NUM_NULLS: 0
      NUM_DISTINCTS: 1
      AVG_COL_LEN: 0.0000
      MAX_COL_LEN: 0
      NUM_TRUES: 0
      NUM_FALSES: 0
      LAST_ANALYZED: 1368596151
      2 rows in set (0.00 sec)

      Attachments

        1. HIVE-4561.1.patch
          2 kB
          Zhuoluo Yang
        2. HIVE-4561.2.patch
          2 kB
          Zhuoluo Yang
        3. HIVE-4561.3.patch
          3 kB
          Zhuoluo Yang
        4. HIVE-4561.4.patch.txt
          79 kB
          Navis Ryu
        5. HIVE-4561.5.patch.txt
          129 kB
          Navis Ryu
        6. HIVE-4561.6.patch.txt
          131 kB
          Navis Ryu
        7. HIVE-4561.7.patch.txt
          132 kB
          Navis Ryu
        8. HIVE-4561.8.patch.txt
          157 kB
          Navis Ryu
        9. HIVE-4561.9.patch.txt
          133 kB
          Navis Ryu

        Issue Links

          Activity

            People

              navis Navis Ryu
              caofangkun caofangkun
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: