[GitHub] [spark] LuciferYang commented on a diff in pull request #38075: [WIP][SPARK-40633][BUILD] Upgrade janino to 3.1.8

2022-11-18 Thread GitBox


LuciferYang commented on code in PR #38075:
URL: https://github.com/apache/spark/pull/38075#discussion_r1026500589


##
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala:
##
@@ -1310,7 +1310,7 @@ case class CatalystToExternalMap private(
 
 val tupleClass = classOf[(_, _)].getName
 val appendToBuilder = s"""
-  $tupleClass $tupleLoopValue;
+  $tupleClass $tupleLoopValue = null;

Review Comment:
   The root cause of the change has not been investigated



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] LuciferYang commented on a diff in pull request #38075: [WIP][SPARK-40633][BUILD] Upgrade janino to 3.1.8

2022-11-18 Thread GitBox


LuciferYang commented on code in PR #38075:
URL: https://github.com/apache/spark/pull/38075#discussion_r1026497690


##
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala:
##
@@ -1310,7 +1310,7 @@ case class CatalystToExternalMap private(
 
 val tupleClass = classOf[(_, _)].getName
 val appendToBuilder = s"""
-  $tupleClass $tupleLoopValue;
+  $tupleClass $tupleLoopValue = null;

Review Comment:
   init to null for fix
   
   ```
   /* 063 */ scala.Tuple2 tupleLoopValue_0;
   /* 064 */
   /* 065 */ if (false) {
   /* 066 */   tupleLoopValue_0 = new 
scala.Tuple2(value_CatalystToExternalMap_key_lambda_variable_1, null);
   /* 067 */ } else {
   /* 068 */   tupleLoopValue_0 = new 
scala.Tuple2(value_CatalystToExternalMap_key_lambda_variable_1, 
value_CatalystToExternalMap_value_lambda_variable_2);
   /* 069 */ }
   /* 070 */
   /* 071 */ builderValue_0.$plus$eq(tupleLoopValue_0);
   /* 072 */
   ```
   
   ```
   Caused by: org.codehaus.commons.compiler.InternalCompilerException: File 
'generated.java', Line 71, Column 16: Compiling 
"builderValue_0.$plus$eq(tupleLoopValue_0)"
at 
org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5819)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:4053)
at org.codehaus.janino.UnitCompiler.access$6100(UnitCompiler.java:236)
at 
org.codehaus.janino.UnitCompiler$13.visitMethodInvocation(UnitCompiler.java:4028)
at 
org.codehaus.janino.UnitCompiler$13.visitMethodInvocation(UnitCompiler.java:4003)
at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:5470)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:4003)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2487)
... 155 more
   Caused by: org.codehaus.commons.compiler.InternalCompilerException: File 
'generated.java', Line 71, Column 25: Compiling "tupleLoopValue_0"
at 
org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5819)
at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:5323)
at org.codehaus.janino.UnitCompiler.access$9300(UnitCompiler.java:236)
at 
org.codehaus.janino.UnitCompiler$16.visitMethodInvocation(UnitCompiler.java:4698)
at 
org.codehaus.janino.UnitCompiler$16.visitMethodInvocation(UnitCompiler.java:4674)
at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:5470)
at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:4674)
at 
org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5817)
... 162 more
   Caused by: org.codehaus.commons.compiler.InternalCompilerException: Invalid 
local variable index 10
at 
org.codehaus.janino.UnitCompiler.getLocalVariableTypeInfo(UnitCompiler.java:13498)
at org.codehaus.janino.UnitCompiler.load(UnitCompiler.java:12500)
at org.codehaus.janino.UnitCompiler.load(UnitCompiler.java:12475)
at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4745)
at org.codehaus.janino.UnitCompiler.access$8200(UnitCompiler.java:236)
at 
org.codehaus.janino.UnitCompiler$16$1.visitLocalVariableAccess(UnitCompiler.java:4684)
at 
org.codehaus.janino.UnitCompiler$16$1.visitLocalVariableAccess(UnitCompiler.java:4678)
at org.codehaus.janino.Java$LocalVariableAccess.accept(Java.java:4661)
at 
org.codehaus.janino.UnitCompiler$16.visitLvalue(UnitCompiler.java:4678)
at 
org.codehaus.janino.UnitCompiler$16.visitLvalue(UnitCompiler.java:4674)
at org.codehaus.janino.Java$Lvalue.accept(Java.java:4528)
at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:4674)
at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4741)
at org.codehaus.janino.UnitCompiler.access$7700(UnitCompiler.java:236)
at 
org.codehaus.janino.UnitCompiler$16$1.visitAmbiguousName(UnitCompiler.java:4679)
at 
org.codehaus.janino.UnitCompiler$16$1.visitAmbiguousName(UnitCompiler.java:4678)
at org.codehaus.janino.Java$AmbiguousName.accept(Java.java:4603)
at 
org.codehaus.janino.UnitCompiler$16.visitLvalue(UnitCompiler.java:4678)
at 
org.codehaus.janino.UnitCompiler$16.visitLvalue(UnitCompiler.java:4674)
at org.codehaus.janino.Java$Lvalue.accept(Java.java:4528)
at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:4674)
at 
org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5817)
... 169 more
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at: