dongjoon-hyun commented on a change in pull request #21668: [SPARK-24690][SQL]
Add a config to control plan stats computation in LogicalRelation
URL: https://github.com/apache/spark/pull/21668#discussion_r349904584
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala
##########
@@ -55,13 +55,13 @@ class StatisticsSuite extends StatisticsCollectionTestBase
with TestHiveSingleto
Seq(dsTbl, hiveTbl).foreach { tbl =>
sql(s"ANALYZE TABLE $tbl COMPUTE STATISTICS")
val catalogStats = getCatalogStatistics(tbl)
- withSQLConf(SQLConf.CBO_ENABLED.key -> "false") {
+ withSQLConf(SQLConf.CBO_ENABLED.key -> "false",
SQLConf.PLAN_STATS_ENABLED.key -> "false") {
val relationStats =
spark.table(tbl).queryExecution.optimizedPlan.stats
assert(relationStats.sizeInBytes == catalogStats.sizeInBytes)
assert(relationStats.rowCount.isEmpty)
}
spark.sessionState.catalog.refreshTable(TableIdentifier(tbl))
- withSQLConf(SQLConf.CBO_ENABLED.key -> "true") {
+ withSQLConf(SQLConf.CBO_ENABLED.key -> "true",
SQLConf.PLAN_STATS_ENABLED.key -> "true") {
Review comment:
This one also can be reverted.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]