Github user CodingCat commented on a diff in the pull request: https://github.com/apache/spark/pull/19864#discussion_r154500900 --- 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 -- thanks, @viirya , yes, you're right! I misread the generated plan, working on it
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org