Removing spurious dependency from catalyst.impl to the other modules.
parent
54f855de1a
commit
f50de1abb0
49
build.sc
49
build.sc
|
@ -106,38 +106,37 @@ object astral extends Module
|
|||
def scalaVersion = "2.13.8"
|
||||
|
||||
def generatedSources = T{ astral.catalyst.rendered() }
|
||||
def moduleDeps = Seq(astral.compiler, astral.catalyst)
|
||||
|
||||
def ivyDeps = Agg(
|
||||
ivy"org.apache.spark::spark-sql::3.4.1",
|
||||
)
|
||||
|
||||
def internalJavaVersion = T {
|
||||
try {
|
||||
val jvm = System.getProperties().getProperty("java.version")
|
||||
println(f"Running Vizier with `${jvm}`")
|
||||
jvm.split("\\.")(0).toInt
|
||||
} catch {
|
||||
case _:NumberFormatException | _:ArrayIndexOutOfBoundsException =>
|
||||
println("Unable to retrieve java version. Guessing 11+")
|
||||
11
|
||||
}
|
||||
}
|
||||
def internalJavaVersion = T {
|
||||
try {
|
||||
val jvm = System.getProperties().getProperty("java.version")
|
||||
println(f"Running Catalyst lite with `${jvm}`")
|
||||
jvm.split("\\.")(0).toInt
|
||||
} catch {
|
||||
case _:NumberFormatException | _:ArrayIndexOutOfBoundsException =>
|
||||
println("Unable to retrieve java version. Guessing 11+")
|
||||
11
|
||||
}
|
||||
}
|
||||
|
||||
def forkArgs = T {
|
||||
if(internalJavaVersion() >= 11){
|
||||
Seq(
|
||||
// Required on Java 11+ for Arrow compatibility
|
||||
// per: https://spark.apache.org/docs/latest/index.html
|
||||
"-Dio.netty.tryReflectionSetAccessible=true",
|
||||
def forkArgs = T {
|
||||
if(internalJavaVersion() >= 11){
|
||||
Seq(
|
||||
// Required on Java 11+ for Arrow compatibility
|
||||
// per: https://spark.apache.org/docs/latest/index.html
|
||||
"-Dio.netty.tryReflectionSetAccessible=true",
|
||||
|
||||
// Required for Spark on java 11+
|
||||
// per: https://stackoverflow.com/questions/72230174/java-17-solution-for-spark-java-lang-noclassdeffounderror-could-not-initializ
|
||||
"--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
|
||||
)
|
||||
} else { Seq[String]() }
|
||||
}
|
||||
// Required for Spark on java 11+
|
||||
// per: https://stackoverflow.com/questions/72230174/java-17-solution-for-spark-java-lang-noclassdeffounderror-could-not-initializ
|
||||
"--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
|
||||
)
|
||||
} else { Seq[String]() }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue