[ https://issues.apache.org/jira/browse/HIVE-17536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16168751#comment-16168751 ]
Vineet Garg commented on HIVE-17536: ------------------------------------ This is for queries without from e.g. {{select 1}}. getBasicStats return -1 and then {{estimateRowSizeFromSchema}} isn't able to estimate since there is no data so we end up returning -1. Previously on countering 0 number of rows we were instead returning 1. One way of handling this is to change getNumRows to return 1 instead of -1. > StatsUtil::getBasicStatForTable doesn't distinguish b/w absence of statistics > or zero stats > ------------------------------------------------------------------------------------------- > > Key: HIVE-17536 > URL: https://issues.apache.org/jira/browse/HIVE-17536 > Project: Hive > Issue Type: Improvement > Components: Statistics > Reporter: Vineet Garg > Assignee: Vineet Garg > Attachments: HIVE-17536.1.patch, HIVE-17536.2.patch > > > This method returns zero for both of the following cases: > * Statistics are missing in metastore > * Actual stats e.g. number of rows are zero > It'll be good for this method to return e.g. -1 in absence of statistics > instead of assuming it to be zero. -- This message was sent by Atlassian JIRA (v6.4.14#64029)