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

    https://github.com/apache/spark/pull/21189#discussion_r185043356
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/SizeInBytesOnlyStatsPlanVisitor.scala
 ---
    @@ -33,8 +33,8 @@ object SizeInBytesOnlyStatsPlanVisitor extends 
LogicalPlanVisitor[Statistics] {
       private def visitUnaryNode(p: UnaryNode): Statistics = {
         // There should be some overhead in Row object, the size should not be 
zero when there is
         // no columns, this help to prevent divide-by-zero error.
    -    val childRowSize = p.child.output.map(_.dataType.defaultSize).sum + 8
    -    val outputRowSize = p.output.map(_.dataType.defaultSize).sum + 8
    +    val childRowSize = EstimationUtils.getSizePerRow(p.child.output)
    +    val outputRowSize = EstimationUtils.getSizePerRow(p.output)
    --- End diff --
    
    cc @juliuszsompolski @cloud-fan 


---

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

Reply via email to