Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ import scala.reflect.ClassTag
abstract class BackendTestSettings {

private val enabledSuites: java.util.Map[String, SuiteSettings] = new util.HashMap()
private val disabledSuites: java.util.Map[String, String] = new util.HashMap()

protected def enableSuite[T: ClassTag]: SuiteSettings = {
enableSuite(implicitly[ClassTag[T]].runtimeClass.getCanonicalName)
}

protected def enableSuite(suiteName: String): SuiteSettings = {
if (disabledSuites.containsKey(suiteName)) {
throw new IllegalArgumentException("Suite is already disabled: " + suiteName)
}
if (enabledSuites.containsKey(suiteName)) {
throw new IllegalArgumentException("Duplicated suite name: " + suiteName)
}
Comment on lines 37 to 43
Expand All @@ -42,18 +46,28 @@ abstract class BackendTestSettings {
suiteSettings
}

protected def disableSuite[T: ClassTag](reason: String): Unit = {
disableSuite(implicitly[ClassTag[T]].runtimeClass.getCanonicalName, reason)
}

protected def disableSuite(suiteName: String, reason: String): Unit = {
require(reason.nonEmpty, "Disable reason must not be empty")
if (enabledSuites.containsKey(suiteName)) {
throw new IllegalArgumentException("Suite is already enabled: " + suiteName)
}
Comment on lines +53 to +57
if (disabledSuites.containsKey(suiteName)) {
throw new IllegalArgumentException("Duplicated disabled suite: " + suiteName)
}
disabledSuites.put(suiteName, reason)
}
Comment on lines +53 to +62

private[utils] def shouldRun(suiteName: String, testName: String): Boolean = {
if (!enabledSuites.containsKey(suiteName)) {
if (disabledSuites.containsKey(suiteName) || !enabledSuites.containsKey(suiteName)) {
return false
}

val suiteSettings = enabledSuites.get(suiteName)

suiteSettings.disableReason match {
case Some(_) => return false
case _ => // continue
}

val inclusion = suiteSettings.inclusion.asScala
val exclusion = suiteSettings.exclusion.asScala

Expand Down Expand Up @@ -88,8 +102,6 @@ abstract class BackendTestSettings {
private[utils] val inclusion: util.List[IncludeBase] = new util.ArrayList()
private[utils] val exclusion: util.List[ExcludeBase] = new util.ArrayList()

private[utils] var disableReason: Option[String] = None

def include(testNames: String*): SuiteSettings = {
inclusion.add(Include(testNames: _*))
this
Expand All @@ -114,13 +126,6 @@ abstract class BackendTestSettings {
this
}

def disable(reason: String): SuiteSettings = {
disableReason = disableReason match {
case Some(r) => throw new IllegalArgumentException("Disable reason already set: " + r)
case None => Some(reason)
}
this
}
}

object SuiteSettings {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1853,9 +1853,8 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("CREATE TABLE USING AS SELECT based on the file without write permission")
.exclude("create a table, drop it and create another one with the same name")
enableSuite[GlutenDDLSourceLoadSuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenExternalCommandRunnerSuite]
enableSuite[GlutenFilteredScanSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,8 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("CREATE TABLE USING AS SELECT based on the file without write permission")
.exclude("create a table, drop it and create another one with the same name")
enableSuite[GlutenDDLSourceLoadSuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenExternalCommandRunnerSuite]
enableSuite[GlutenFilteredScanSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1715,9 +1715,8 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("CREATE TABLE USING AS SELECT based on the file without write permission")
.exclude("create a table, drop it and create another one with the same name")
enableSuite[GlutenDDLSourceLoadSuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenExternalCommandRunnerSuite]
enableSuite[GlutenFilteredScanSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,8 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("CREATE TABLE USING AS SELECT based on the file without write permission")
.exclude("create a table, drop it and create another one with the same name")
enableSuite[GlutenDDLSourceLoadSuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenExternalCommandRunnerSuite]
enableSuite[GlutenFilteredScanSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,8 @@ class ClickHouseTestSettings extends BackendTestSettings {
.includeCH("update char/varchar columns")
enableSuite[GlutenDeltaBasedUpdateTableSuite]
enableSuite[GlutenDeprecatedAPISuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenDynamicPartitionPruningV1SuiteAEOff]
.excludeGlutenTest("Subquery reuse across the whole plan")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,8 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("CREATE TABLE USING AS SELECT based on the file without write permission")
.exclude("create a table, drop it and create another one with the same name")
enableSuite[GlutenDDLSourceLoadSuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenExternalCommandRunnerSuite]
enableSuite[GlutenFilteredScanSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,8 @@ class ClickHouseTestSettings extends BackendTestSettings {
.includeCH("update char/varchar columns")
enableSuite[GlutenDeltaBasedUpdateTableSuite]
enableSuite[GlutenDeprecatedAPISuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenDynamicPartitionPruningV1SuiteAEOff]
.excludeGlutenTest("Subquery reuse across the whole plan")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,24 +234,27 @@ class VeloxTestSettings extends BackendTestSettings {
enableSuite[GlutenCsvExpressionsSuite]
enableSuite[GlutenDynamicPruningSubquerySuite]
enableSuite[GlutenExprIdSuite]
// GlutenExpressionEvalHelperSuite is not enabled: it validates Spark's ExpressionEvalHelper
// contract, while Gluten overrides checkEvaluation/checkExceptionInExpression.
disableSuite[GlutenExpressionEvalHelperSuite](
"Validates Spark's ExpressionEvalHelper contract, while Gluten overrides " +
"checkEvaluation/checkExceptionInExpression")
enableSuite[GlutenExpressionImplUtilsSuite]
enableSuite[GlutenExpressionSQLBuilderSuite]
enableSuite[GlutenExpressionSetSuite]
enableSuite[GlutenExtractPredicatesWithinOutputSetSuite]
enableSuite[GlutenHexSuite]
enableSuite[GlutenMutableProjectionSuite]
enableSuite[GlutenNamedExpressionSuite]
// GlutenObjectExpressionsSuite is not enabled: object/encoder interpreted execution is
// JVM-side coverage and currently fails under Gluten's expression evaluation harness.
disableSuite[GlutenObjectExpressionsSuite](
"Object/encoder interpreted execution is JVM-side coverage and currently fails under " +
"Gluten's expression evaluation harness")
enableSuite[GlutenOrderingSuite]
// GlutenScalaUDFSuite is not enabled: ScalaUDF executes on the JVM/fallback path, so
// this parent suite has limited Velox coverage value and still has one inherited failure.
disableSuite[GlutenScalaUDFSuite](
"ScalaUDF executes on the JVM/fallback path, so this parent suite has limited Velox " +
"coverage value and still has one inherited failure")
enableSuite[GlutenSchemaPruningSuite]
enableSuite[GlutenSelectedFieldSuite]
// GlutenSubExprEvaluationRuntimeSuite is removed because SubExprEvaluationRuntimeSuite
// is in test-jar without shaded Guava, while SubExprEvaluationRuntime is shaded.
disableSuite[GlutenSubExprEvaluationRuntimeSuite](
"Spark's test JAR uses unshaded Guava, while SubExprEvaluationRuntime uses shaded Guava")
enableSuite[GlutenSubexpressionEliminationSuite]
enableSuite[GlutenTimeWindowSuite]
enableSuite[GlutenToPrettyStringSuite]
Expand Down Expand Up @@ -734,8 +737,9 @@ class VeloxTestSettings extends BackendTestSettings {
enableSuite[GlutenLogicalPlanTagInSparkPlanSuite]
enableSuite[GlutenOptimizeMetadataOnlyQuerySuite]
enableSuite[GlutenPersistedViewTestSuite]
// TODO: 4.x enableSuite[GlutenPlannerSuite] // 1 failure
// TODO: 4.x enableSuite[GlutenProjectedOrderingAndPartitioningSuite] // 6 failures
disableSuite[GlutenPlannerSuite]("Validates Spark planner implementation details")
disableSuite[GlutenProjectedOrderingAndPartitioningSuite](
"Validates Spark planner output ordering and partitioning metadata")
enableSuite[GlutenQueryPlanningTrackerEndToEndSuite]
// TODO: 4.x enableSuite[GlutenRemoveRedundantProjectsSuite] // 14 failures
enableSuite[GlutenRemoveRedundantSortsSuite]
Expand All @@ -759,7 +763,8 @@ class VeloxTestSettings extends BackendTestSettings {
enableSuite[GlutenUnsafeFixedWidthAggregationMapSuite]
enableSuite[GlutenUnsafeKVExternalSorterSuite]
enableSuite[GlutenUnsafeRowSerializerSuite]
// TODO: 4.x enableSuite[GlutenWholeStageCodegenSparkSubmitSuite] // 1 failure
disableSuite[GlutenWholeStageCodegenSparkSubmitSuite](
"The SparkSubmit test launches Spark's main class without the Gluten plugin")
enableSuite[GlutenWholeStageCodegenSuite]
// Rewrite with Gluten-aware native whole-stage plan assertions.
.exclude("range/filter should be combined")
Expand Down Expand Up @@ -839,9 +844,8 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("CREATE TABLE USING AS SELECT based on the file without write permission")
.exclude("create a table, drop it and create another one with the same name")
enableSuite[GlutenDDLSourceLoadSuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenExternalCommandRunnerSuite]
enableSuite[GlutenFilteredScanSuite]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.sql.catalyst.expressions

import org.apache.spark.sql.GlutenTestsTrait

class GlutenSubExprEvaluationRuntimeSuite
extends SubExprEvaluationRuntimeSuite
with GlutenTestsTrait {}
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,8 @@ class ClickHouseTestSettings extends BackendTestSettings {
.includeCH("update char/varchar columns")
enableSuite[GlutenDeltaBasedUpdateTableSuite]
enableSuite[GlutenDeprecatedAPISuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenDynamicPartitionPruningV1SuiteAEOff]
.excludeGlutenTest("Subquery reuse across the whole plan")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,24 +243,27 @@ class VeloxTestSettings extends BackendTestSettings {
enableSuite[GlutenCsvExpressionsSuite]
enableSuite[GlutenDynamicPruningSubquerySuite]
enableSuite[GlutenExprIdSuite]
// GlutenExpressionEvalHelperSuite is not enabled: it validates Spark's ExpressionEvalHelper
// contract, while Gluten overrides checkEvaluation/checkExceptionInExpression.
disableSuite[GlutenExpressionEvalHelperSuite](
"Validates Spark's ExpressionEvalHelper contract, while Gluten overrides " +
"checkEvaluation/checkExceptionInExpression")
enableSuite[GlutenExpressionImplUtilsSuite]
enableSuite[GlutenExpressionSQLBuilderSuite]
enableSuite[GlutenExpressionSetSuite]
enableSuite[GlutenExtractPredicatesWithinOutputSetSuite]
enableSuite[GlutenHexSuite]
enableSuite[GlutenMutableProjectionSuite]
enableSuite[GlutenNamedExpressionSuite]
// GlutenObjectExpressionsSuite is not enabled: object/encoder interpreted execution is
// JVM-side coverage and currently fails under Gluten's expression evaluation harness.
disableSuite[GlutenObjectExpressionsSuite](
"Object/encoder interpreted execution is JVM-side coverage and currently fails under " +
"Gluten's expression evaluation harness")
enableSuite[GlutenOrderingSuite]
// GlutenScalaUDFSuite is not enabled: ScalaUDF executes on the JVM/fallback path, so
// this parent suite has limited Velox coverage value and still has one inherited failure.
disableSuite[GlutenScalaUDFSuite](
"ScalaUDF executes on the JVM/fallback path, so this parent suite has limited Velox " +
"coverage value and still has one inherited failure")
enableSuite[GlutenSchemaPruningSuite]
enableSuite[GlutenSelectedFieldSuite]
// GlutenSubExprEvaluationRuntimeSuite is removed because SubExprEvaluationRuntimeSuite
// is in test-jar without shaded Guava, while SubExprEvaluationRuntime is shaded.
disableSuite[GlutenSubExprEvaluationRuntimeSuite](
"Spark's test JAR uses unshaded Guava, while SubExprEvaluationRuntime uses shaded Guava")
enableSuite[GlutenSubexpressionEliminationSuite]
enableSuite[GlutenTimeWindowSuite]
enableSuite[GlutenToPrettyStringSuite]
Expand Down Expand Up @@ -713,8 +716,9 @@ class VeloxTestSettings extends BackendTestSettings {
enableSuite[GlutenLogicalPlanTagInSparkPlanSuite]
enableSuite[GlutenOptimizeMetadataOnlyQuerySuite]
enableSuite[GlutenPersistedViewTestSuite]
// TODO: 4.x enableSuite[GlutenPlannerSuite] // 1 failure
// TODO: 4.x enableSuite[GlutenProjectedOrderingAndPartitioningSuite] // 6 failures
disableSuite[GlutenPlannerSuite]("Validates Spark planner implementation details")
disableSuite[GlutenProjectedOrderingAndPartitioningSuite](
"Validates Spark planner output ordering and partitioning metadata")
enableSuite[GlutenQueryPlanningTrackerEndToEndSuite]
// TODO: 4.x enableSuite[GlutenRemoveRedundantProjectsSuite] // 14 failures
enableSuite[GlutenRemoveRedundantSortsSuite]
Expand All @@ -738,7 +742,8 @@ class VeloxTestSettings extends BackendTestSettings {
enableSuite[GlutenUnsafeFixedWidthAggregationMapSuite]
enableSuite[GlutenUnsafeKVExternalSorterSuite]
enableSuite[GlutenUnsafeRowSerializerSuite]
// TODO: 4.x enableSuite[GlutenWholeStageCodegenSparkSubmitSuite] // 1 failure
disableSuite[GlutenWholeStageCodegenSparkSubmitSuite](
"The SparkSubmit test launches Spark's main class without the Gluten plugin")
enableSuite[GlutenWholeStageCodegenSuite]
// Rewrite with Gluten-aware native whole-stage plan assertions.
.exclude("range/filter should be combined")
Expand Down Expand Up @@ -820,9 +825,8 @@ class VeloxTestSettings extends BackendTestSettings {
.exclude("CREATE TABLE USING AS SELECT based on the file without write permission")
.exclude("create a table, drop it and create another one with the same name")
enableSuite[GlutenDDLSourceLoadSuite]
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite]
.disable(
"DISABLED: GLUTEN-4893 Vanilla UT checks scan operator by exactly matching the class type")
disableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuite](
"GLUTEN-4893: Vanilla UT checks scan operator by exactly matching the class type")
enableSuite[GlutenDisableUnnecessaryBucketedScanWithoutHiveSupportSuiteAE]
enableSuite[GlutenExternalCommandRunnerSuite]
enableSuite[GlutenFilteredScanSuite]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.sql.catalyst.expressions

import org.apache.spark.sql.shim.GlutenTestsTrait

class GlutenSubExprEvaluationRuntimeSuite
extends SubExprEvaluationRuntimeSuite
with GlutenTestsTrait {}
Loading