Hive
  1. Hive
  2. HIVE-6727

Table level stats for external tables are set incorrectly

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.13.0, 0.13.1
    • Fix Version/s: None
    • Component/s: Metastore
    • 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

        Activity

          People

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

            Dates

            • Created:
              Updated:

              Development