Skip to content

Commit 09ea1be

Browse files
committed
add thread threshold conf in CometTestBase
1 parent 2d97cfb commit 09ea1be

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

spark/src/test/scala/org/apache/spark/sql/CometTestBase.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ abstract class CometTestBase
8989
// this is an edge case, and we expect most users to allow sorts on floating point, so we
9090
// enable this for the tests
9191
conf.set(CometConf.getExprAllowIncompatConfigKey("SortOrder"), "true")
92+
// For spark 4.0 tests, we need limit the thread threshold to avoid OOM, see:
93+
// https://github.com/apache/datafusion-comet/issues/2965
94+
conf.set(
95+
"spark.sql.shuffleExchange.maxThreadThreshold",
96+
sys.env.getOrElse("SPARK_TEST_SQL_SHUFFLE_EXCHANGE_MAX_THREAD_THRESHOLD", "1024"))
97+
conf.set(
98+
"spark.sql.resultQueryStage.maxThreadThreshold",
99+
sys.env.getOrElse("SPARK_TEST_SQL_RESULT_QUERY_STAGE_MAX_THREAD_THRESHOLD", "1024"))
92100
conf
93101
}
94102

0 commit comments

Comments
 (0)