Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/19864#discussion_r154492920 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala --- @@ -71,9 +73,17 @@ case class InMemoryRelation( override def computeStats(): Statistics = { if (batchStats.value == 0L) { - // Underlying columnar RDD hasn't been materialized, no useful statistics information - // available, return the default statistics. - Statistics(sizeInBytes = child.sqlContext.conf.defaultSizeInBytes) + children.filter(_.isInstanceOf[LogicalRelation]) match { + case Seq(c @ LogicalRelation(_, _, _, _), _) if c.conf.cboEnabled => --- End diff -- `InMemoryRelation` is a `logical.LeafNode`. I think it has no children?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org