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

    https://github.com/apache/spark/pull/18421#discussion_r128166394
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/CommandUtils.scala
 ---
    @@ -112,4 +112,29 @@ object CommandUtils extends Logging {
         size
       }
     
    +  def compareAndGetNewStats(
    +      oldStats: Option[CatalogStatistics],
    +      newTotalSize: BigInt,
    +      newRowCount: Option[BigInt]): Option[CatalogStatistics] = {
    +    val oldTotalSize = oldStats.map(_.sizeInBytes.toLong).getOrElse(0L)
    +    val oldRowCount = 
oldStats.flatMap(_.rowCount.map(_.toLong)).getOrElse(-1L)
    +    var newStats: Option[CatalogStatistics] = None
    +    if (newTotalSize > 0 && newTotalSize != oldTotalSize) {
    --- End diff --
    
    Is that possible the new one is equal to zero?


---
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