You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/12 06:15:37 UTC
[GitHub] [spark] wangyum opened a new pull request, #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
wangyum opened a new pull request, #37163:
URL: https://github.com/apache/spark/pull/37163
### What changes were proposed in this pull request?
This PR enable `spark.sql.cbo.enabled` by default.
### Why are the changes needed?
1. Enable CBO to get better performance, we've enabled it over 3 years.
2. Benchmark related tests also enabled it:https://github.com/apache/spark/blob/e83f8a872a16d4f049cefb1fc445f91cf84443ad/sql/core/src/test/scala/org/apache/spark/sql/TPCBase.scala#L32
### Does this PR introduce _any_ user-facing change?
Maybe. But user can disable it by `set spark.sql.cbo.enabled=false`.
### How was this patch tested?
Fix existing tests.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1181466673
cc @sigmod @maryannxue @viirya
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] sunchao commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
sunchao commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1181997866
@wangyum do you have any numbers on the performance gain from this?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] c21 commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
c21 commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1193282956
This is a great move, thanks @wangyum for starting this! I think CBO and AQE could work well together, with CBO handles query without shuffle in a better way, and AQE handles query with shuffle in a better way. With more accurate AQE statistics, CBO optimizer could also do a better job for query planning.
But I shared similar question with @dongjoon-hyun, when the statistics is out of date to become inaccurate, current CBO has no way to check it AFAIK. It would be great if we can add more check / work around for it in 3.4 release to either (1).make statistics up-to-date, or (2).automatically disable CBO if statistics is stale.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1182708274
@viirya Here is an example. AQE can be converted to broadcast join, but the performance is worse than directly planned to broadcast join.
```scala
import org.apache.spark.benchmark.Benchmark
val numRows = 1024 * 1024 * 25
spark.sql(s"CREATE TABLE t1 using parquet AS SELECT id AS a, id AS b, id AS c, id AS d, id AS e FROM range(${numRows}L)")
spark.sql(s"CREATE TABLE t2 using parquet AS SELECT id AS a, id AS b, id AS c, id AS d, id AS e FROM range(${numRows}L)")
spark.sql("ANALYZE TABLE t1 COMPUTE STATISTICS FOR ALL COLUMNS")
spark.sql("ANALYZE TABLE t2 COMPUTE STATISTICS FOR ALL COLUMNS")
val benchmark = new Benchmark(s"Benchmark SPARK-39750", numRows, minNumIters = 5)
Seq(false, true).foreach { enabled =>
val name = s"CBO is ${if (enabled) "Enabled" else "Disabled"}"
benchmark.addCase(name) { _ =>
withSQLConf("spark.sql.cbo.enabled" -> s"$enabled") {
spark.sql(s"SELECT * FROM t1 JOIN t2 ON t1.a = t2.a AND t2.b < 10000").write.format("noop").mode("Overwrite").save()
}
}
}
benchmark.run()
```
```
Java HotSpot(TM) 64-Bit Server VM 1.8.0_281-b09 on Mac OS X 10.15.7
Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Benchmark SPARK-39750: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
CBO is Disabled 5277 5570 195 5.0 201.3 1.0X
CBO is Enabled 1378 1582 166 19.0 52.6 3.8X
```
Default | Enable CBO
-- | --
 | <img width="622" alt="image" src="https://user-images.githubusercontent.com/5399861/178641161-742b2fa7-9047-4a05-985e-32a240aa7cee.png">
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on a diff in pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on code in PR #37163:
URL: https://github.com/apache/spark/pull/37163#discussion_r918589988
##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/DynamicPartitionPruningHiveScanSuite.scala:
##########
@@ -41,6 +42,16 @@ abstract class DynamicPartitionPruningHiveScanSuiteBase
case _ => Nil
}
}
+
+ override protected def beforeAll(): Unit = {
+ super.beforeAll()
+ conf.setConf(SQLConf.CBO_ENABLED, false)
Review Comment:
To fix the test error:
<img width="1241" alt="image" src="https://user-images.githubusercontent.com/5399861/178422851-a4f60bc5-2593-4ac0-876c-1bcff332918c.png">
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on a diff in pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on code in PR #37163:
URL: https://github.com/apache/spark/pull/37163#discussion_r918588559
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/FilterEstimation.scala:
##########
@@ -58,6 +58,7 @@ case class FilterEstimation(plan: Filter) extends Logging {
rowsAfterFilter = filteredRowCount)
}
val filteredSizeInBytes: BigInt = getOutputSize(plan.output, filteredRowCount, newColStats)
+ .min(plan.child.stats.sizeInBytes)
Review Comment:
To fix the test error:
<img width="1260" alt="image" src="https://user-images.githubusercontent.com/5399861/178422367-6aa26b63-1135-4741-8fcc-c2a0551c0fd4.png">
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on a diff in pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on code in PR #37163:
URL: https://github.com/apache/spark/pull/37163#discussion_r918589988
##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/DynamicPartitionPruningHiveScanSuite.scala:
##########
@@ -41,6 +42,16 @@ abstract class DynamicPartitionPruningHiveScanSuiteBase
case _ => Nil
}
}
+
+ override protected def beforeAll(): Unit = {
+ super.beforeAll()
+ conf.setConf(SQLConf.CBO_ENABLED, false)
Review Comment:
To fix the test error:
![Uploading image.png…]()
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] LuciferYang commented on a diff in pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #37163:
URL: https://github.com/apache/spark/pull/37163#discussion_r919652743
##########
sql/core/src/test/scala/org/apache/spark/sql/InjectRuntimeFilterSuite.scala:
##########
@@ -209,11 +209,13 @@ class InjectRuntimeFilterSuite extends QueryTest with SQLTestUtils with SharedSp
// `MergeScalarSubqueries` can duplicate subqueries in the optimized plan and would make testing
// complicated.
conf.setConfString(SQLConf.OPTIMIZER_EXCLUDED_RULES.key, MergeScalarSubqueries.ruleName)
+ conf.setConf(SQLConf.CBO_ENABLED, false)
Review Comment:
Seems this line is to keep consistent with the previous behavior, but should we add some TODO for this change? For example, spilt this Suites into `withCBOEnabled` and `withCBODisabled`?
I found many suites in this class will fail when `CBOEnabled`.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] github-actions[bot] closed pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
URL: https://github.com/apache/spark/pull/37163
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on a diff in pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on code in PR #37163:
URL: https://github.com/apache/spark/pull/37163#discussion_r918586900
##########
sql/core/src/test/scala/org/apache/spark/sql/StatisticsCollectionSuite.scala:
##########
@@ -353,48 +353,65 @@ class StatisticsCollectionSuite extends StatisticsCollectionTestBase with Shared
test("invalidation of tableRelationCache after inserts") {
val table = "invalidate_catalog_cache_table"
- Seq(false, true).foreach { autoUpdate =>
- withSQLConf(SQLConf.AUTO_SIZE_UPDATE_ENABLED.key -> autoUpdate.toString) {
- withTable(table) {
- spark.range(100).write.saveAsTable(table)
- sql(s"ANALYZE TABLE $table COMPUTE STATISTICS")
- spark.table(table)
- val initialSizeInBytes = getTableFromCatalogCache(table).stats.sizeInBytes
- spark.range(100).write.mode(SaveMode.Append).saveAsTable(table)
- spark.table(table)
- assert(getTableFromCatalogCache(table).stats.sizeInBytes == 2 * initialSizeInBytes)
+ Seq(false, true).foreach { cboEnabled =>
+ Seq(false, true).foreach { autoUpdate =>
+ withSQLConf(
+ SQLConf.CBO_ENABLED.key -> cboEnabled.toString,
+ SQLConf.AUTO_SIZE_UPDATE_ENABLED.key -> autoUpdate.toString) {
+ withTable(table) {
+ spark.range(100).write.saveAsTable(table)
+ sql(s"ANALYZE TABLE $table COMPUTE STATISTICS")
+ spark.table(table)
+ val initialSizeInBytes = getTableFromCatalogCache(table).stats.sizeInBytes
+ spark.range(100).write.mode(SaveMode.Append).saveAsTable(table)
+ spark.table(table)
+ if (!cboEnabled) {
+ assert(getTableFromCatalogCache(table).stats.sizeInBytes === 2 * initialSizeInBytes)
+ } else {
+ assert(getTableFromCatalogCache(table).stats.sizeInBytes > initialSizeInBytes)
+ }
+ }
}
}
}
}
test("invalidation of tableRelationCache after alter table add partition") {
val table = "invalidate_catalog_cache_table"
- Seq(false, true).foreach { autoUpdate =>
- withSQLConf(SQLConf.AUTO_SIZE_UPDATE_ENABLED.key -> autoUpdate.toString) {
- withTempDir { dir =>
- withTable(table) {
- val path = dir.getCanonicalPath
- sql(s"""
- |CREATE TABLE $table (col1 int, col2 int)
- |USING PARQUET
- |PARTITIONED BY (col2)
- |LOCATION '${dir.toURI}'""".stripMargin)
- sql(s"ANALYZE TABLE $table COMPUTE STATISTICS")
- spark.table(table)
- assert(getTableFromCatalogCache(table).stats.sizeInBytes == 0)
- spark.catalog.recoverPartitions(table)
- val df = Seq((1, 2), (1, 2)).toDF("col2", "col1")
- df.write.parquet(s"$path/col2=1")
- sql(s"ALTER TABLE $table ADD PARTITION (col2=1) LOCATION '${dir.toURI}'")
- spark.table(table)
- val cachedTable = getTableFromCatalogCache(table)
- val cachedTableSizeInBytes = cachedTable.stats.sizeInBytes
- val defaultSizeInBytes = conf.defaultSizeInBytes
- if (autoUpdate) {
- assert(cachedTableSizeInBytes != defaultSizeInBytes && cachedTableSizeInBytes > 0)
- } else {
- assert(cachedTableSizeInBytes == defaultSizeInBytes)
+ Seq(false, true).foreach { cboEnabled =>
+ Seq(false, true).foreach { autoUpdate =>
+ withSQLConf(
+ SQLConf.CBO_ENABLED.key -> cboEnabled.toString,
+ SQLConf.AUTO_SIZE_UPDATE_ENABLED.key -> autoUpdate.toString) {
+ withTempDir { dir =>
+ withTable(table) {
+ val path = dir.getCanonicalPath
+ sql(
+ s"""
+ |CREATE TABLE $table (col1 int, col2 int)
+ |USING PARQUET
+ |PARTITIONED BY (col2)
+ |LOCATION '${dir.toURI}'""".stripMargin)
+ sql(s"ANALYZE TABLE $table COMPUTE STATISTICS")
+ spark.table(table)
+ if (!cboEnabled) {
+ assert(getTableFromCatalogCache(table).stats.sizeInBytes === 0)
+ } else {
+ assert(getTableFromCatalogCache(table).stats.sizeInBytes === 1)
Review Comment:
The size is 1, not 0:
https://github.com/apache/spark/blob/ddc61e62b9af5deff1b93e22f466f2a13f281155/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/EstimationUtils.scala#L116-L118
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1184861404
Could you add some description about some requirements or assumptions. For example, what happens when the statistics are incorrect?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] mridulm commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
mridulm commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1193668692
+CC @zoelin7 FYI
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1182692655
> @wangyum do you have any numbers on the performance gain from this?
Will update the benchmark results later.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] dongjoon-hyun commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1181960925
cc @sunchao , @viirya , @huaxingao
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1184232593
TPC-DS q47:
Default | Enable CBO
-- | --
 | 
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] github-actions[bot] commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1301517583
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1184237637
TPC-DS q47:
Default | Enable CBO
-- | --
 | 
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on PR #37163:
URL: https://github.com/apache/spark/pull/37163#issuecomment-1181369549
cc @cloud-fan
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] wangyum commented on a diff in pull request #37163: [SPARK-39750][SQL] Enable `spark.sql.cbo.enabled` by default
Posted by GitBox <gi...@apache.org>.
wangyum commented on code in PR #37163:
URL: https://github.com/apache/spark/pull/37163#discussion_r918589133
##########
sql/core/src/test/scala/org/apache/spark/sql/InjectRuntimeFilterSuite.scala:
##########
@@ -209,11 +209,13 @@ class InjectRuntimeFilterSuite extends QueryTest with SQLTestUtils with SharedSp
// `MergeScalarSubqueries` can duplicate subqueries in the optimized plan and would make testing
// complicated.
conf.setConfString(SQLConf.OPTIMIZER_EXCLUDED_RULES.key, MergeScalarSubqueries.ruleName)
+ conf.setConf(SQLConf.CBO_ENABLED, false)
Review Comment:
To fix the test error:
<img width="1195" alt="image" src="https://user-images.githubusercontent.com/5399861/178422514-d5bfdac8-5518-40d3-b8ae-6c6571b351e4.png">
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org