zhztheplayer commented on code in PR #5382:
URL: https://github.com/apache/incubator-gluten/pull/5382#discussion_r1561998560
##########
gluten-core/src/test/scala/org/apache/spark/sql/GlutenQueryTest.scala:
##########
@@ -44,13 +44,18 @@ abstract class GlutenQueryTest extends PlanTest {
protected def spark: SparkSession
+ protected val sparkVersion: String = {
+ val version = SPARK_VERSION_SHORT.split("\\.")
+ version(0) + "." + version(1)
+ }
+
def ignore(
testName: String,
minSparkVersion: Option[String] = None,
maxSparkVersion: Option[String] = None)(testFun: => Any): Unit = {
if (
- minSparkVersion.forall(_ <= SPARK_VERSION_SHORT)
- && maxSparkVersion.forall(_ >= SPARK_VERSION_SHORT)
+ minSparkVersion.forall(_ <= sparkVersion)
+ && maxSparkVersion.forall(_ >= sparkVersion)
Review Comment:
It's like comparing by plain string was wrong...
I ran
```scala
println("3.3" > "3.2")
println("3.1" > "3.2")
println("3.12" > "3.2")
```
Output:
```
true
false
false
```
Apparently `println("3.12" > "3.2")` should output `true` rather than
`false`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]