LuciferYang commented on code in PR #37487:
URL: https://github.com/apache/spark/pull/37487#discussion_r945090727
##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala:
##########
@@ -249,11 +254,18 @@ class HiveExternalCatalogVersionsSuite extends
SparkSubmitTestUtils {
}
object PROCESS_TABLES extends QueryTest with SQLTestUtils {
+ val isPythonVersionAtLeast37 = TestUtils.isPythonVersionAtLeast37()
val releaseMirror = sys.env.getOrElse("SPARK_RELEASE_MIRROR",
"https://dist.apache.org/repos/dist/release")
// Tests the latest version of every release line.
- val testingVersions: Seq[String] = {
+ val testingVersions: Seq[String] = if (isPythonVersionAtLeast37) {
import scala.io.Source
+ // SPARK-40053: This set needs to be redefined when there are version
releases or EOL.
+ val testableVersions = if
(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17)) {
+ Set("3.2, 3.3")
+ } else {
+ Set("3.1, 3.2, 3.3")
Review Comment:
```
versions.filter(v => !v.startsWith("2.4") && !v.startsWith("3.0"))
.filter(v => !(v.startsWith("3.1") &&
SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17)))
```
If EOL versions are not deleted from the data source, it seems that the
condition `!v.startsWith("2.4") && !v.startsWith("3.0")` will be added
continuously, this is similar to
```scala
// needs to be redefined when there are EOL
val eolVersions = Set("2.4", "3.0")
versions.filterNot(v => eolVersions.exists(v.startsWith))
.filter(v => !(v.startsWith("3.1") &&
SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_17)))
```
--
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]