diff --git a/pom.xml b/pom.xml
index 5354ad4d6c..311437cc9b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,7 +88,7 @@ under the License.
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED
-Djdk.reflect.useDirectMethodHandle=false
- -ea -Xmx6g -Xss4m ${extraJavaTestArgs}
+ -ea -Xmx4g -Xss4m ${extraJavaTestArgs}
spark-3.3-plus
spark-3.4-plus
not-needed
diff --git a/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQuerySuite.scala b/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQuerySuite.scala
index 329d0d0573..864f2c03e0 100644
--- a/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQuerySuite.scala
+++ b/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQuerySuite.scala
@@ -28,7 +28,6 @@ import org.apache.comet.CometConf
class CometTPCDSQuerySuite
extends {
val tpcdsAllQueries: Seq[String] = Seq(
- "q72",
"q1",
"q2",
"q3",
@@ -109,6 +108,7 @@ class CometTPCDSQuerySuite
"q69",
"q70",
"q71",
+ "q72",
"q73",
"q74",
"q75",
@@ -138,7 +138,6 @@ class CometTPCDSQuerySuite
"q99")
val tpcdsAllQueriesV2_7_0: Seq[String] = Seq(
- "q72",
"q5a",
"q6",
"q10a",
@@ -163,6 +162,7 @@ class CometTPCDSQuerySuite
"q64",
"q67a",
"q70a",
+ "q72",
"q74",
"q75",
"q77a",
diff --git a/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQueryTestSuite.scala b/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQueryTestSuite.scala
index 6aec042af9..71a68da68d 100644
--- a/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQueryTestSuite.scala
+++ b/spark/src/test/scala/org/apache/spark/sql/CometTPCDSQueryTestSuite.scala
@@ -221,8 +221,13 @@ class CometTPCDSQueryTestSuite extends QueryTest with TPCDSBase with CometSQLQue
test(s"$name-v2.7") {
val goldenFile = new File(s"$baseResourcePath/v2_7", s"$name.sql.out")
joinConfs.foreach { conf =>
- System.gc() // SPARK-37368
- runQuery(queryString, goldenFile, conf)
+ val sortMergeJoin = sortMergeJoinConf != conf
+ // Skip q72 for sort-merge join because it uses too many resources
+ // that can cause OOM in GitHub Actions
+ if (!(sortMergeJoin && name == "q72")) {
+ System.gc() // SPARK-37368
+ runQuery(queryString, goldenFile, conf)
+ }
}
}
}