[ 
https://issues.apache.org/jira/browse/HIVE-5936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839635#comment-13839635
 ] 

Navis commented on HIVE-5936:
-----------------------------

For the TOTAL_SIZE, it looks fair enough. But for ROW_COUNT and RAW_DATA_SIZE 
which is calculated by scanning the table, the default value could be -1 
returning the meaning of emptiness to "zero". ie,
{noformat}
long nr = getNumRows(dbName, tabName);
long rds = getRawDataSize(dbName, tabName);

 // could be "rds < 0"
if (rds <= 0) {
  rds = getTotalSize(dbName, tabName);
  if (rds <= 0) {
    rds = getFileSizeForTable(conf, table);
  }
}
// this seemed not needed
if (nr < 0) {
  nr = 0;
}
{noformat}

> analyze command failing to collect stats with counter mechanism
> ---------------------------------------------------------------
>
>                 Key: HIVE-5936
>                 URL: https://issues.apache.org/jira/browse/HIVE-5936
>             Project: Hive
>          Issue Type: Bug
>          Components: Statistics
>    Affects Versions: 0.13.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Navis
>         Attachments: HIVE-5936.1.patch.txt, HIVE-5936.2.patch.txt
>
>
> With counter mechanism, MR job is successful, but StatsTask on client fails 
> with NPE.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to