Github user wzhfy commented on a diff in the pull request: https://github.com/apache/spark/pull/14712#discussion_r76545213 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala --- @@ -207,9 +207,11 @@ class FindDataSourceTable(sparkSession: SparkSession) extends Rule[LogicalPlan] className = table.provider.get, options = table.storage.properties) - LogicalRelation( + val logicalRel = LogicalRelation( dataSource.resolveRelation(), metastoreTableIdentifier = Some(table.identifier)) + logicalRel.inheritedStats = table.catalogStats --- End diff -- Do you mean adding statistics as a constructor parameter in LogicalRelation? I tried this in my first implementation, but many code paths needed to be fixed (pattern match like LogicalRelation(src: BaseRelation, _, _)). I'll switch back if that's ok.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org