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

Table level stats for external tables are set incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.13.0, 0.14.0, 0.13.1, 1.0.0, 1.2.0, 1.1.0
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: Statistics
    • Labels:
      None

      Description

      if you do the following:

      CREATE EXTERNAL TABLE anaylyze_external (a INT) LOCATION 'data/files/ext_test';
      describe formatted anaylyze_external;
      

      The table level stats are:

      Table Parameters:
      	COLUMN_STATS_ACCURATE	true
      	EXTERNAL            	TRUE
      	numFiles            	0
      	numRows             	6
      	rawDataSize         	6
      	totalSize           	0
      

      numFiles and totalSize is always 0.
      Issue is:
      MetaStoreUtils:updateUnpartitionedTableStatsFast attempts to set table level stats from FileStatus. But it doesn't account for External tables, it always calls Warehouse.getFileStatusesForUnpartitionedTable

        Attachments

        1. HIVE-6727.3.patch
          3 kB
          Bing Li
        2. HIVE-6727.2.patch
          0.8 kB
          Bing Li

          Activity

            People

            • Assignee:
              libing Bing Li
              Reporter:
              rhbutani Harish Butani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: