Github user heary-cao commented on a diff in the pull request:
https://github.com/apache/spark/pull/19251#discussion_r143377744
--- 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 --
Does 8 represent the overhead of each row of data?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]