Skip to content

Commit b60ea7e

Browse files
committed
rebase_main
1 parent 245718a commit b60ea7e

1 file changed

Lines changed: 102 additions & 0 deletions

File tree

dev/diffs/4.0.1.diff

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1+
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/IgnoreComet.scala b/sql/core/src/test/scala/org/apache/spark/sql/IgnoreComet.scala
2+
new file mode 100644
3+
index 00000000000..5691536c114
4+
--- /dev/null
5+
+++ b/sql/core/src/test/scala/org/apache/spark/sql/IgnoreComet.scala
6+
@@ -0,0 +1,45 @@
7+
+/*
8+
+ * Licensed to the Apache Software Foundation (ASF) under one or more
9+
+ * contributor license agreements. See the NOTICE file distributed with
10+
+ * this work for additional information regarding copyright ownership.
11+
+ * The ASF licenses this file to You under the Apache License, Version 2.0
12+
+ * (the "License"); you may not use this file except in compliance with
13+
+ * the License. You may obtain a copy of the License at
14+
+ *
15+
+ * http://www.apache.org/licenses/LICENSE-2.0
16+
+ *
17+
+ * Unless required by applicable law or agreed to in writing, software
18+
+ * distributed under the License is distributed on an "AS IS" BASIS,
19+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20+
+ * See the License for the specific language governing permissions and
21+
+ * limitations under the License.
22+
+ */
23+
+
24+
+package org.apache.spark.sql
25+
+
26+
+import org.scalactic.source.Position
27+
+import org.scalatest.Tag
28+
+
29+
+import org.apache.spark.sql.test.SQLTestUtils
30+
+
31+
+/**
32+
+ * Tests with this tag will be ignored when Comet is enabled (e.g., via `ENABLE_COMET`).
33+
+ */
34+
+case class IgnoreComet(reason: String) extends Tag("DisableComet")
35+
+case class IgnoreCometNativeIcebergCompat(reason: String) extends Tag("DisableComet")
36+
+case class IgnoreCometNativeDataFusion(reason: String) extends Tag("DisableComet")
37+
+case class IgnoreCometNativeScan(reason: String) extends Tag("DisableComet")
38+
+
39+
+/**
40+
+ * Helper trait that disables Comet for all tests regardless of default config values.
41+
+ */
42+
+trait IgnoreCometSuite extends SQLTestUtils {
43+
+ override protected def test(testName: String, testTags: Tag*)(testFun: => Any)
44+
+ (implicit pos: Position): Unit = {
45+
+ if (isCometEnabled) {
46+
+ ignore(testName + " (disabled when Comet is on)", testTags: _*)(testFun)
47+
+ } else {
48+
+ super.test(testName, testTags: _*)(testFun)
49+
+ }
50+
+ }
51+
+}
152
diff --git a/pom.xml b/pom.xml
253
index 22922143fc3..7c56e5e8641 100644
354
--- a/pom.xml
@@ -709,6 +760,57 @@ index 9c529d14221..2f1bc3880fd 100644
709760
}.flatten
710761
assert(filters.contains(GreaterThan(scan.logicalPlan.output.head, Literal(5L))))
711762
}
763+
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/IgnoreComet.scala b/sql/core/src/test/scala/org/apache/spark/sql/IgnoreComet.scala
764+
new file mode 100644
765+
index 00000000000..5691536c114
766+
--- /dev/null
767+
+++ b/sql/core/src/test/scala/org/apache/spark/sql/IgnoreComet.scala
768+
@@ -0,0 +1,45 @@
769+
+/*
770+
+ * Licensed to the Apache Software Foundation (ASF) under one or more
771+
+ * contributor license agreements. See the NOTICE file distributed with
772+
+ * this work for additional information regarding copyright ownership.
773+
+ * The ASF licenses this file to You under the Apache License, Version 2.0
774+
+ * (the "License"); you may not use this file except in compliance with
775+
+ * the License. You may obtain a copy of the License at
776+
+ *
777+
+ * http://www.apache.org/licenses/LICENSE-2.0
778+
+ *
779+
+ * Unless required by applicable law or agreed to in writing, software
780+
+ * distributed under the License is distributed on an "AS IS" BASIS,
781+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
782+
+ * See the License for the specific language governing permissions and
783+
+ * limitations under the License.
784+
+ */
785+
+
786+
+package org.apache.spark.sql
787+
+
788+
+import org.scalactic.source.Position
789+
+import org.scalatest.Tag
790+
+
791+
+import org.apache.spark.sql.test.SQLTestUtils
792+
+
793+
+/**
794+
+ * Tests with this tag will be ignored when Comet is enabled (e.g., via `ENABLE_COMET`).
795+
+ */
796+
+case class IgnoreComet(reason: String) extends Tag("DisableComet")
797+
+case class IgnoreCometNativeIcebergCompat(reason: String) extends Tag("DisableComet")
798+
+case class IgnoreCometNativeDataFusion(reason: String) extends Tag("DisableComet")
799+
+case class IgnoreCometNativeScan(reason: String) extends Tag("DisableComet")
800+
+
801+
+/**
802+
+ * Helper trait that disables Comet for all tests regardless of default config values.
803+
+ */
804+
+trait IgnoreCometSuite extends SQLTestUtils {
805+
+ override protected def test(testName: String, testTags: Tag*)(testFun: => Any)
806+
+ (implicit pos: Position): Unit = {
807+
+ if (isCometEnabled) {
808+
+ ignore(testName + " (disabled when Comet is on)", testTags: _*)(testFun)
809+
+ } else {
810+
+ super.test(testName, testTags: _*)(testFun)
811+
+ }
812+
+ }
813+
+}
712814
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/InjectRuntimeFilterSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/InjectRuntimeFilterSuite.scala
713815
index 7d7185ae6c1..442a5bddeb8 100644
714816
--- a/sql/core/src/test/scala/org/apache/spark/sql/InjectRuntimeFilterSuite.scala

0 commit comments

Comments
 (0)