Skip to content

Commit 9951305

Browse files
Remove childrenStats.
1 parent 16fc60a commit 9951305

File tree

1 file changed

+4
-3
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical

1 file changed

+4
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ abstract class LogicalPlan extends QueryPlan[LogicalPlan] {
4040
* defaults to the product of children's `sizeInBytes`.
4141
*/
4242
case class Statistics(
43-
sizeInBytes: Long = childrenStats.map(_.sizeInBytes).product
43+
sizeInBytes: Long
44+
)
45+
lazy val statistics: Statistics = Statistics(
46+
sizeInBytes = children.map(_.statistics).map(_.sizeInBytes).product
4447
)
45-
lazy val statistics: Statistics = new Statistics
46-
lazy val childrenStats = children.map(_.statistics)
4748

4849
/**
4950
* Returns the set of attributes that are referenced by this node

0 commit comments

Comments
 (0)