Skip to content

Commit 2084675

Browse files
kiszksrowen
authored andcommitted
[SPARK-22688][SQL] Upgrade Janino version to 3.0.8
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)). Existing tests Author: Kazuaki Ishizaki <[email protected]> Closes #19890 from kiszk/SPARK-22688. (cherry picked from commit 8ae004b) Signed-off-by: Sean Owen <[email protected]>
1 parent 7fd6d53 commit 2084675

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

dev/deps/spark-deps-hadoop-2.6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ commons-beanutils-core-1.8.0.jar
3131
commons-cli-1.2.jar
3232
commons-codec-1.10.jar
3333
commons-collections-3.2.2.jar
34-
commons-compiler-3.0.7.jar
34+
commons-compiler-3.0.8.jar
3535
commons-compress-1.4.1.jar
3636
commons-configuration-1.6.jar
3737
commons-crypto-1.0.0.jar
@@ -90,8 +90,8 @@ jackson-mapper-asl-1.9.13.jar
9090
jackson-module-paranamer-2.6.5.jar
9191
jackson-module-scala_2.11-2.6.5.jar
9292
jackson-xc-1.9.13.jar
93-
janino-3.0.7.jar
94-
java-xmlbuilder-1.0.jar
93+
janino-3.0.8.jar
94+
java-xmlbuilder-1.1.jar
9595
javassist-3.18.1-GA.jar
9696
javax.annotation-api-1.2.jar
9797
javax.inject-1.jar

dev/deps/spark-deps-hadoop-2.7

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ commons-beanutils-core-1.8.0.jar
3131
commons-cli-1.2.jar
3232
commons-codec-1.10.jar
3333
commons-collections-3.2.2.jar
34-
commons-compiler-3.0.7.jar
34+
commons-compiler-3.0.8.jar
3535
commons-compress-1.4.1.jar
3636
commons-configuration-1.6.jar
3737
commons-crypto-1.0.0.jar
@@ -90,8 +90,8 @@ jackson-mapper-asl-1.9.13.jar
9090
jackson-module-paranamer-2.6.5.jar
9191
jackson-module-scala_2.11-2.6.5.jar
9292
jackson-xc-1.9.13.jar
93-
janino-3.0.7.jar
94-
java-xmlbuilder-1.0.jar
93+
janino-3.0.8.jar
94+
java-xmlbuilder-1.1.jar
9595
javassist-3.18.1-GA.jar
9696
javax.annotation-api-1.2.jar
9797
javax.inject-1.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
@@ -30,7 +30,7 @@ import com.google.common.cache.{CacheBuilder, CacheLoader}
3030
import com.google.common.util.concurrent.{ExecutionError, UncheckedExecutionException}
3131
import org.apache.commons.lang3.exception.ExceptionUtils
3232
import org.codehaus.commons.compiler.CompileException
33-
import org.codehaus.janino.{ByteArrayClassLoader, ClassBodyEvaluator, JaninoRuntimeException, SimpleCompiler}
33+
import org.codehaus.janino.{ByteArrayClassLoader, ClassBodyEvaluator, InternalCompilerException, SimpleCompiler}
3434
import org.codehaus.janino.util.ClassFile
3535

3636
import org.apache.spark.{SparkEnv, TaskContext, TaskKilledException}
@@ -1000,10 +1000,10 @@ object CodeGenerator extends Logging {
10001000
evaluator.cook("generated.java", code.body)
10011001
recordCompilationStats(evaluator)
10021002
} catch {
1003-
case e: JaninoRuntimeException =>
1003+
case e: InternalCompilerException =>
10041004
val msg = s"failed to compile: $e\n$formatted"
10051005
logError(msg, e)
1006-
throw new JaninoRuntimeException(msg, e)
1006+
throw new InternalCompilerException(msg, e)
10071007
case e: CompileException =>
10081008
val msg = s"failed to compile: $e\n$formatted"
10091009
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
@@ -373,7 +373,7 @@ abstract class SparkPlan extends QueryPlan[SparkPlan] with Logging with Serializ
373373
try {
374374
GeneratePredicate.generate(expression, inputSchema)
375375
} catch {
376-
case e @ (_: JaninoRuntimeException | _: CompileException)
376+
case e @ (_: InternalCompilerException | _: CompileException)
377377
if sqlContext == null || sqlContext.conf.wholeStageFallback =>
378378
genInterpretedPredicate(expression, inputSchema)
379379
}

0 commit comments

Comments
 (0)