You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2017/10/04 16:28:06 UTC

[GitHub] spark pull request #19251: [SPARK-22035][SQL]the value of statistical logica...

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

    https://github.com/apache/spark/pull/19251#discussion_r142722330
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/SizeInBytesOnlyStatsPlanVisitor.scala ---
    @@ -32,12 +31,14 @@ object SizeInBytesOnlyStatsPlanVisitor extends LogicalPlanVisitor[Statistics] {
        * same as the output row number, and compute sizes based on the column types.
        */
       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
    --- End diff --
    
    The original codes look right.


---

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