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

Incorrect condition in StatsOpimizer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • 3.2.0
    • Statistics
    • None

    Description

      At the moment StatsOpimizer has code

              if (rowCnt == null) {
                // if rowCnt < 1 than its either empty table or table on which stats are not
                //  computed We assume the worse and don't attempt to optimize.
                Logger.debug("Table doesn't have up to date stats " + tbl.getTableName());
                rowCnt = null;
              }
      

      in method private Long getRowCnt(). Condition

      if (rowCnt == null) {
      

      should be changed to

      if (rowCnt == null || rowCnt == 0) {
      

      because 0 value also means that table stats may not be computed.

      Attachments

        1. HIVE-18279.1.patch
          2 kB
          Oleksiy Sayankin

        Issue Links

          Activity

            People

              osayankin Oleksiy Sayankin
              osayankin Oleksiy Sayankin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: