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

    https://github.com/apache/spark/pull/16594#discussion_r97481455
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala
 ---
    @@ -54,11 +56,32 @@ case class Statistics(
     
       /** Readable string representation for the Statistics. */
       def simpleString: String = {
    -    Seq(s"sizeInBytes=$sizeInBytes",
    -      if (rowCount.isDefined) s"rowCount=${rowCount.get}" else "",
    +    Seq(s"sizeInBytes=${format(sizeInBytes, isSize = true)}",
    +      if (rowCount.isDefined) s"rowCount=${format(rowCount.get, isSize = 
false)}" else "",
           s"isBroadcastable=$isBroadcastable"
         ).filter(_.nonEmpty).mkString(", ")
       }
    +
    +  /** Print the given number in a readable format. */
    +  def format(number: BigInt, isSize: Boolean): String = {
    --- End diff --
    
    That method can only accepts Long parameter, and estimated stats can still 
be unreadable even when using TB as unit.


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