This is an automated email from the ASF dual-hosted git repository.
philo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 96ff034e4 [GLUTEN-5301] Remove unnecessary test util method
'isSparkVersionAtleast' (#5302)
96ff034e4 is described below
commit 96ff034e476503396529c481db786d1e11162567
Author: Yan Ma <[email protected]>
AuthorDate: Sun Apr 7 19:42:45 2024 +0800
[GLUTEN-5301] Remove unnecessary test util method 'isSparkVersionAtleast'
(#5302)
---
.../gluten/execution/WholeStageTransformerSuite.scala | 15 ---------------
.../org/apache/gluten/execution/VeloxDeltaSuite.scala | 3 +--
.../org/apache/gluten/execution/VeloxIcebergSuite.scala | 9 +++------
3 files changed, 4 insertions(+), 23 deletions(-)
diff --git
a/gluten-core/src/test/scala/org/apache/gluten/execution/WholeStageTransformerSuite.scala
b/gluten-core/src/test/scala/org/apache/gluten/execution/WholeStageTransformerSuite.scala
index a45a8ad7d..67c12a6f7 100644
---
a/gluten-core/src/test/scala/org/apache/gluten/execution/WholeStageTransformerSuite.scala
+++
b/gluten-core/src/test/scala/org/apache/gluten/execution/WholeStageTransformerSuite.scala
@@ -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(
diff --git
a/gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
b/gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
index 64afd486d..1e0be6ff1 100644
---
a/gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
+++
b/gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
@@ -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
diff --git
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
b/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
index 46c77d5b8..d9abd6472 100644
---
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
+++
b/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
@@ -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) {
@@ -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) {
@@ -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) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]