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

Table level stats for external tables are set incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.0, 0.13.1, 0.14.0, 1.0.0, 1.1.0, 1.2.0
    • 1.3.0, 2.0.0
    • Statistics
    • 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.2.patch
          0.8 kB
          Bing Li
        2. HIVE-6727.3.patch
          3 kB
          Bing Li

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: