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

        Ashutosh Chauhan made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Gunther Hagleitner made changes -
        Fix Version/s 0.14.0 [ 12326450 ]
        Bing Li made changes -
        Attachment HIVE-6727.1.patch [ 12675790 ]
        Bing Li made changes -
        Attachment HIVE-6727.2.patch [ 12675820 ]
        Bing Li made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Bing Li made changes -
        Component/s Metastore [ 12312584 ]
        Bing Li made changes -
        Affects Version/s 0.13.1 [ 12326829 ]
        Affects Version/s 0.13.0 [ 12324986 ]
        Bing Li made changes -
        Fix Version/s 0.14.0 [ 12326450 ]
        Bing Li made changes -
        Attachment HIVE-6727.1.patch [ 12675790 ]
        Bing Li made changes -
        Field Original Value New Value
        Assignee Bing Li [ libing ]
        Harish Butani created issue -

          People

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

            Dates

            • Created:
              Updated:

              Development