@@ -574,6 +574,57 @@ index 93275487f29..510e3087e0f 100644
574574 }.flatten
575575 assert(filters.contains(GreaterThan(scan.logicalPlan.output.head, Literal(5L))))
576576 }
577+ 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
578+ new file mode 100644
579+ index 00000000000..1ee842b6f62
580+ --- /dev/null
581+ +++ b/sql/core/src/test/scala/org/apache/spark/sql/IgnoreComet.scala
582+ @@ -0,0 +1,45 @@
583+ + /*
584+ + * Licensed to the Apache Software Foundation (ASF) under one or more
585+ + * contributor license agreements. See the NOTICE file distributed with
586+ + * this work for additional information regarding copyright ownership.
587+ + * The ASF licenses this file to You under the Apache License, Version 2.0
588+ + * (the "License"); you may not use this file except in compliance with
589+ + * the License. You may obtain a copy of the License at
590+ + *
591+ + * http://www.apache.org/licenses/LICENSE-2.0
592+ + *
593+ + * Unless required by applicable law or agreed to in writing, software
594+ + * distributed under the License is distributed on an "AS IS" BASIS,
595+ + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
596+ + * See the License for the specific language governing permissions and
597+ + * limitations under the License.
598+ + */
599+ +
600+ + package org.apache.spark.sql
601+ +
602+ + import org.scalactic.source.Position
603+ + import org.scalatest.Tag
604+ +
605+ + import org.apache.spark.sql.test.SQLTestUtils
606+ +
607+ + /**
608+ + * Tests with this tag will be ignored when Comet is enabled (e.g., via `ENABLE_COMET`).
609+ + */
610+ + case class IgnoreComet(reason: String) extends Tag("DisableComet")
611+ + case class IgnoreCometNativeIcebergCompat(reason: String) extends Tag("DisableComet")
612+ + case class IgnoreCometNativeDataFusion(reason: String) extends Tag("DisableComet")
613+ + case class IgnoreCometNativeScan(reason: String) extends Tag("DisableComet")
614+ +
615+ + /**
616+ + * Helper trait that disables Comet for all tests regardless of default config values.
617+ + */
618+ + trait IgnoreCometSuite extends SQLTestUtils {
619+ + override protected def test(testName: String, testTags: Tag*)(testFun: => Any)(implicit
620+ + pos: Position): Unit = {
621+ + if (isCometEnabled) {
622+ + ignore(testName + " (disabled when Comet is on)", testTags: _*)(testFun)
623+ + } else {
624+ + super.test(testName, testTags: _*)(testFun)
625+ + }
626+ + }
627+ + }
577628diff --git a/sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala
578629index 7af826583bd..3c3def1eb67 100644
579630--- a/sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala
0 commit comments