Skip to content

Commit 8ae004b

Browse files
kiszkgatorsmile
authored andcommitted
[SPARK-22688][SQL] Upgrade Janino version to 3.0.8
## What changes were proposed in this pull request? This PR upgrade Janino version to 3.0.8. [Janino 3.0.8](https://janino-compiler.github.io/janino/changelog.html) includes an important fix to reduce the number of constant pool entries by using 'sipush' java bytecode. * SIPUSH bytecode is not used for short integer constant [#33](janino-compiler/janino#33). Please see detail in [this discussion thread](#19518 (comment)). ## How was this patch tested? Existing tests Author: Kazuaki Ishizaki <[email protected]> Closes #19890 from kiszk/SPARK-22688.
1 parent f110a7f commit 8ae004b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

dev/deps/spark-deps-hadoop-2.6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ commons-beanutils-core-1.8.0.jar
3535
commons-cli-1.2.jar
3636
commons-codec-1.10.jar
3737
commons-collections-3.2.2.jar
38-
commons-compiler-3.0.7.jar
38+
commons-compiler-3.0.8.jar
3939
commons-compress-1.4.1.jar
4040
commons-configuration-1.6.jar
4141
commons-crypto-1.0.0.jar
@@ -96,7 +96,7 @@ jackson-mapper-asl-1.9.13.jar
9696
jackson-module-paranamer-2.7.9.jar
9797
jackson-module-scala_2.11-2.6.7.1.jar
9898
jackson-xc-1.9.13.jar
99-
janino-3.0.7.jar
99+
janino-3.0.8.jar
100100
java-xmlbuilder-1.1.jar
101101
javassist-3.18.1-GA.jar
102102
javax.annotation-api-1.2.jar

dev/deps/spark-deps-hadoop-2.7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ commons-beanutils-core-1.8.0.jar
3535
commons-cli-1.2.jar
3636
commons-codec-1.10.jar
3737
commons-collections-3.2.2.jar
38-
commons-compiler-3.0.7.jar
38+
commons-compiler-3.0.8.jar
3939
commons-compress-1.4.1.jar
4040
commons-configuration-1.6.jar
4141
commons-crypto-1.0.0.jar
@@ -96,7 +96,7 @@ jackson-mapper-asl-1.9.13.jar
9696
jackson-module-paranamer-2.7.9.jar
9797
jackson-module-scala_2.11-2.6.7.1.jar
9898
jackson-xc-1.9.13.jar
99-
janino-3.0.7.jar
99+
janino-3.0.8.jar
100100
java-xmlbuilder-1.1.jar
101101
javassist-3.18.1-GA.jar
102102
javax.annotation-api-1.2.jar

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
<!-- org.apache.commons/commons-lang3/-->
171171
<commons-lang3.version>3.5</commons-lang3.version>
172172
<datanucleus-core.version>3.2.10</datanucleus-core.version>
173-
<janino.version>3.0.7</janino.version>
173+
<janino.version>3.0.8</janino.version>
174174
<jersey.version>2.22.2</jersey.version>
175175
<joda.version>2.9.3</joda.version>
176176
<jodd.version>3.5.2</jodd.version>

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import scala.util.control.NonFatal
2929
import com.google.common.cache.{CacheBuilder, CacheLoader}
3030
import com.google.common.util.concurrent.{ExecutionError, UncheckedExecutionException}
3131
import org.codehaus.commons.compiler.CompileException
32-
import org.codehaus.janino.{ByteArrayClassLoader, ClassBodyEvaluator, JaninoRuntimeException, SimpleCompiler}
32+
import org.codehaus.janino.{ByteArrayClassLoader, ClassBodyEvaluator, InternalCompilerException, SimpleCompiler}
3333
import org.codehaus.janino.util.ClassFile
3434

3535
import org.apache.spark.{SparkEnv, TaskContext, TaskKilledException}
@@ -1240,12 +1240,12 @@ object CodeGenerator extends Logging {
12401240
evaluator.cook("generated.java", code.body)
12411241
updateAndGetCompilationStats(evaluator)
12421242
} catch {
1243-
case e: JaninoRuntimeException =>
1243+
case e: InternalCompilerException =>
12441244
val msg = s"failed to compile: $e"
12451245
logError(msg, e)
12461246
val maxLines = SQLConf.get.loggingMaxLinesForCodegen
12471247
logInfo(s"\n${CodeFormatter.format(code, maxLines)}")
1248-
throw new JaninoRuntimeException(msg, e)
1248+
throw new InternalCompilerException(msg, e)
12491249
case e: CompileException =>
12501250
val msg = s"failed to compile: $e"
12511251
logError(msg, e)

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import scala.collection.mutable.ArrayBuffer
2323
import scala.concurrent.ExecutionContext
2424

2525
import org.codehaus.commons.compiler.CompileException
26-
import org.codehaus.janino.JaninoRuntimeException
26+
import org.codehaus.janino.InternalCompilerException
2727

2828
import org.apache.spark.{broadcast, SparkEnv}
2929
import org.apache.spark.internal.Logging
@@ -385,7 +385,7 @@ abstract class SparkPlan extends QueryPlan[SparkPlan] with Logging with Serializ
385385
try {
386386
GeneratePredicate.generate(expression, inputSchema)
387387
} catch {
388-
case _ @ (_: JaninoRuntimeException | _: CompileException) if codeGenFallBack =>
388+
case _ @ (_: InternalCompilerException | _: CompileException) if codeGenFallBack =>
389389
genInterpretedPredicate(expression, inputSchema)
390390
}
391391
}

0 commit comments

Comments
 (0)