Skip to content

Commit

Permalink
[GLUTEN-5301] Remove unnecessary test util method 'isSparkVersionAtle…
Browse files Browse the repository at this point in the history
…ast' (#5302)
  • Loading branch information
yma11 authored Apr 7, 2024
1 parent 9d6f95d commit 96ff034
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,6 @@ abstract class WholeStageTransformerSuite
.set("spark.gluten.ui.enabled", "false")
}

protected def isSparkVersionAtleast(version: String): Boolean = {
val currentVersion = spark.version
val currentVersionSplit = currentVersion.split("\\.")
val versionSplit = version.split("\\.")
currentVersionSplit.zip(versionSplit).foreach {
case (current, required) =>
if (current.toInt > required.toInt) {
return true
} else if (current.toInt < required.toInt) {
return false
}
}
true
}

protected def checkFallbackOperators(df: DataFrame, num: Int): Unit = {
// Decrease one VeloxColumnarToRowExec for the top level node
assert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ class VeloxDeltaSuite extends WholeStageTransformerSuite {
}
}

test("delta: time travel") {
assume(isSparkVersionAtleast("3.3"))
testWithSpecifiedSparkVersion("delta: time travel", Some("3.3.1")) {
withTable("delta_tm") {
spark.sql(s"""
|create table delta_tm (id int, name string) using delta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class VeloxIcebergSuite extends WholeStageTransformerSuite {
}
}

test("iceberg bucketed join") {
assume(isSparkVersionAtleast("3.4"))
testWithSpecifiedSparkVersion("iceberg bucketed join", Some("3.4")) {
val leftTable = "p_str_tb"
val rightTable = "p_int_tb"
withTable(leftTable, rightTable) {
Expand Down Expand Up @@ -139,8 +138,7 @@ class VeloxIcebergSuite extends WholeStageTransformerSuite {
}
}

test("iceberg bucketed join with partition") {
assume(isSparkVersionAtleast("3.4"))
testWithSpecifiedSparkVersion("iceberg bucketed join with partition", Some("3.4")) {
val leftTable = "p_str_tb"
val rightTable = "p_int_tb"
withTable(leftTable, rightTable) {
Expand Down Expand Up @@ -220,8 +218,7 @@ class VeloxIcebergSuite extends WholeStageTransformerSuite {
}
}

test("iceberg bucketed join with partition filter") {
assume(isSparkVersionAtleast("3.4"))
testWithSpecifiedSparkVersion("iceberg bucketed join with partition filter", Some("3.4")) {
val leftTable = "p_str_tb"
val rightTable = "p_int_tb"
withTable(leftTable, rightTable) {
Expand Down

0 comments on commit 96ff034

Please sign in to comment.