Github user wzhfy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14712#discussion_r75573715
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala ---
    @@ -141,7 +142,16 @@ private[hive] case class MetastoreRelation(
               sparkSession.sessionState.conf.defaultSizeInBytes
             })
         }
    -  )
    +    val tableParams = hiveQlTable.getParameters
    +    val rowCount = tableParams.get(AnalyzeTableCommand.ROW_COUNT)
    +    if (rowCount != null && rowCount.toLong >=0) {
    --- End diff --
    
    actually, I will need the if block to decide whether to compute total size 
when we have column stats. 
    Although we can still use Option(rowCount).map(some function)... for the 
second property estimatedSize, this looks not intuitive. The if-else is easier 
to read.
    So I'll keep the if-else block, what do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to