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

alter partition should check for "hive.stats.autogather" in hiveConf

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 0.13.1
    • None
    • Metastore
    • None

    Description

      When alter partition code path is triggered, it should check for the flag "hive.stats.autogather", if it is true, then only updateStats else skip them.
      This is done in append_partition code flow.
      Is there any specific reason the alter_partition does not respect this conf variable?

      //code snippet : HiveMetastore.java
      private Partition append_partition_common(RawStore ms, String dbName, String tableName,
      List<String> part_vals, EnvironmentContext envContext) throws InvalidObjectException,
      AlreadyExistsException, MetaException {
      ...
      ....
      if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVESTATSAUTOGATHER) &&
      !MetaStoreUtils.isView(tbl))

      { MetaStoreUtils.updatePartitionStatsFast(part, wh, madeDir); }

      ...
      ...
      }

      The above code snippet checks for the variable but this same check is absent in

      //code snippet : HiveAlterHandler.java
      public Partition alterPartition(final RawStore msdb, Warehouse wh, final String dbname,
      final String name, final List<String> part_vals, final Partition new_part)
      throws InvalidOperationException, InvalidObjectException, AlreadyExistsException,
      MetaException {

      ....
      ...
      }

      Attachments

        Activity

          People

            ychena Yongzhi Chen
            pankit Pankit Thapar
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: