You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Randy Tidd (JIRA)" <ji...@apache.org> on 2017/10/20 18:18:00 UTC

[jira] [Comment Edited] (SPARK-22296) CodeGenerator - failed to compile when constructor has scala.collection.mutable.Seq vs. scala.collection.Seq

    [ https://issues.apache.org/jira/browse/SPARK-22296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16212983#comment-16212983 ] 

Randy Tidd edited comment on SPARK-22296 at 10/20/17 6:17 PM:
--------------------------------------------------------------

The example above does not exhibit the problem.  Here is a concise example that does.

Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
17/10/20 14:09:04 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
17/10/20 14:09:08 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
Spark context Web UI available at http://10.10.43.134:4040
Spark context available as 'sc' (master = local[*], app id = local-1508522945163).
Spark session available as 'spark'.
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 2.1.0
      /_/
         
Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131)
Type in expressions to have them evaluated.
Type :help for more information.

scala> case class Foo1(x: Int, s: String, seq: scala.collection.mutable.Seq[Int] = scala.collection.mutable.Seq.empty[Int])
defined class Foo1

scala> val ds1 = Seq(Foo1(1, "a"), Foo1(2, "b")).toDS
ds1: org.apache.spark.sql.Dataset[Foo1] = [x: int, s: string ... 1 more field]

scala> 

scala> case class Foo2(x: Int, s: String)
defined class Foo2

scala> val ds2 = Seq(Foo2(1, "aa"), Foo2(3, "cc")).toDS
ds2: org.apache.spark.sql.Dataset[Foo2] = [x: int, s: string]

scala> 

scala> ds1.joinWith(ds2, ds1.col("x") === ds2.col("x")).collect()
17/10/20 14:09:14 ERROR CodeGenerator: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "$line14.$read$$iw$$iw$Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private $line14.$read$$iw$$iw$Foo1 argValue;
/* 010 */   private $line16.$read$$iw$$iw$Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private $line16.$read$$iw$$iw$Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private $line16.$read$$iw$$iw$Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final $line16.$read$$iw$$iw$Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $line16.$read$$iw$$iw value30 = ($line16.$read$$iw$$iw) obj1;
/* 239 */     final $line16.$read$$iw$$iw$Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     $line14.$read$$iw$$iw$Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final $line14.$read$$iw$$iw$Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $line14.$read$$iw$$iw value18 = ($line14.$read$$iw$$iw) obj;
/* 263 */       final $line14.$read$$iw$$iw$Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     $line16.$read$$iw$$iw$Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "$line14.$read$$iw$$iw$Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
	at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:11004)
	at org.codehaus.janino.UnitCompiler.findMostSpecificIInvocable(UnitCompiler.java:8307)
	at org.codehaus.janino.UnitCompiler.invokeConstructor(UnitCompiler.java:7092)
	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4686)
	at org.codehaus.janino.UnitCompiler.access$8200(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3786)
	at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3762)
	at org.codehaus.janino.Java$NewClassInstance.accept(Java.java:4427)
	at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4067)
	at org.codehaus.janino.UnitCompiler.access$7200(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3771)
	at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3762)
	at org.codehaus.janino.Java$ConditionalExpression.accept(Java.java:3877)
	at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2330)
	at org.codehaus.janino.UnitCompiler.access$2600(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1386)
	at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1370)
	at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(Java.java:2974)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
	at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1436)
	at org.codehaus.janino.UnitCompiler.access$1600(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1376)
	at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1370)
	at org.codehaus.janino.Java$Block.accept(Java.java:2471)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2185)
	at org.codehaus.janino.UnitCompiler.access$1800(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1378)
	at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1370)
	at org.codehaus.janino.Java$IfStatement.accept(Java.java:2621)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
	at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2811)
	at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1262)
	at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1234)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:538)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:890)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:894)
	at org.codehaus.janino.UnitCompiler.access$600(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:377)
	at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:369)
	at org.codehaus.janino.Java$MemberClassDeclaration.accept(Java.java:1128)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
	at org.codehaus.janino.UnitCompiler.compileDeclaredMemberTypes(UnitCompiler.java:1209)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:564)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:420)
	at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:374)
	at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:369)
	at org.codehaus.janino.Java$AbstractPackageMemberClassDeclaration.accept(Java.java:1309)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
	at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:345)
	at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:396)
	at org.codehaus.janino.ClassBodyEvaluator.compileToClass(ClassBodyEvaluator.java:311)
	at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:229)
	at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:196)
	at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:91)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.org$apache$spark$sql$catalyst$expressions$codegen$CodeGenerator$$doCompile(CodeGenerator.scala:935)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:998)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:995)
	at org.spark_project.guava.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
	at org.spark_project.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
	at org.spark_project.guava.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
	at org.spark_project.guava.cache.LocalCache$Segment.get(LocalCache.java:2257)
	at org.spark_project.guava.cache.LocalCache.get(LocalCache.java:4000)
	at org.spark_project.guava.cache.LocalCache.getOrLoad(LocalCache.java:4004)
	at org.spark_project.guava.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.compile(CodeGenerator.scala:890)
	at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:194)
	at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:36)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator.generate(CodeGenerator.scala:874)
	at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection$lzycompute(ExpressionEncoder.scala:272)
	at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection(ExpressionEncoder.scala:272)
	at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.fromRow(ExpressionEncoder.scala:303)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
	at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1.apply(Dataset.scala:2371)
	at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:57)
	at org.apache.spark.sql.Dataset.withNewExecutionId(Dataset.scala:2765)
	at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$execute$1(Dataset.scala:2370)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
	at org.apache.spark.sql.Dataset.withCallback(Dataset.scala:2778)
	at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$collect(Dataset.scala:2375)
	at org.apache.spark.sql.Dataset.collect(Dataset.scala:2351)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>(<console>:32)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>(<console>:37)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw$$iw.<init>(<console>:39)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw.<init>(<console>:41)
	at $line18.$read$$iw$$iw$$iw$$iw.<init>(<console>:43)
	at $line18.$read$$iw$$iw$$iw.<init>(<console>:45)
	at $line18.$read$$iw$$iw.<init>(<console>:47)
	at $line18.$read$$iw.<init>(<console>:49)
	at $line18.$read.<init>(<console>:51)
	at $line18.$read$.<init>(<console>:55)
	at $line18.$read$.<clinit>(<console>)
	at $line18.$eval$.$print$lzycompute(<console>:7)
	at $line18.$eval$.$print(<console>:6)
	at $line18.$eval.$print(<console>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:786)
	at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:1047)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest$$anonfun$loadAndRunReq$1.apply(IMain.scala:638)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest$$anonfun$loadAndRunReq$1.apply(IMain.scala:637)
	at scala.reflect.internal.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)
	at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:19)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest.loadAndRunReq(IMain.scala:637)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:569)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:565)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:807)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:681)
	at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:395)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:415)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:923)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:909)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:909)
	at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:909)
	at org.apache.spark.repl.Main$.doMain(Main.scala:68)
	at org.apache.spark.repl.Main$.main(Main.scala:51)
	at org.apache.spark.repl.Main.main(Main.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:738)
	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)
	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
java.lang.RuntimeException: Error while decoding: java.util.concurrent.ExecutionException: java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private Foo1 argValue;
/* 010 */   private Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $iw value30 = ($iw) obj1;
/* 239 */     final Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $iw value18 = ($iw) obj;
/* 263 */       final Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

newInstance(class scala.Tuple2)
:- if (isnull(input[0, struct<x:int,s:string,seq:array<int>>, false])) null else newInstance(class Foo1)
:  :- isnull(input[0, struct<x:int,s:string,seq:array<int>>, false])
:  :  +- input[0, struct<x:int,s:string,seq:array<int>>, false]
:  :- null
:  +- newInstance(class Foo1)
:     :- assertnotnull(input[0, struct<x:int,s:string,seq:array<int>>, false].x, - field (class: "scala.Int", name: "x"), - root class: "Foo1")
:     :  +- input[0, struct<x:int,s:string,seq:array<int>>, false].x
:     :     +- input[0, struct<x:int,s:string,seq:array<int>>, false]
:     :- input[0, struct<x:int,s:string,seq:array<int>>, false].s.toString
:     :  +- input[0, struct<x:int,s:string,seq:array<int>>, false].s
:     :     +- input[0, struct<x:int,s:string,seq:array<int>>, false]
:     +- staticinvoke(class scala.collection.mutable.WrappedArray$, ObjectType(interface scala.collection.Seq), make, mapobjects(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType, assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1"), input[0, struct<x:int,s:string,seq:array<int>>, false].seq).array, true)
:        +- mapobjects(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType, assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1"), input[0, struct<x:int,s:string,seq:array<int>>, false].seq).array
:           +- mapobjects(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType, assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1"), input[0, struct<x:int,s:string,seq:array<int>>, false].seq)
:              :- assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1")
:              :  +- lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType)
:              +- input[0, struct<x:int,s:string,seq:array<int>>, false].seq
:                 +- input[0, struct<x:int,s:string,seq:array<int>>, false]
+- if (isnull(input[1, struct<x:int,s:string>, false])) null else newInstance(class Foo2)
   :- isnull(input[1, struct<x:int,s:string>, false])
   :  +- input[1, struct<x:int,s:string>, false]
   :- null
   +- newInstance(class Foo2)
      :- assertnotnull(input[1, struct<x:int,s:string>, false].x, - field (class: "scala.Int", name: "x"), - root class: "Foo2")
      :  +- input[1, struct<x:int,s:string>, false].x
      :     +- input[1, struct<x:int,s:string>, false]
      +- input[1, struct<x:int,s:string>, false].s.toString
         +- input[1, struct<x:int,s:string>, false].s
            +- input[1, struct<x:int,s:string>, false]

  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.fromRow(ExpressionEncoder.scala:306)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
  at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
  at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
  at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
  at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1.apply(Dataset.scala:2371)
  at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:57)
  at org.apache.spark.sql.Dataset.withNewExecutionId(Dataset.scala:2765)
  at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$execute$1(Dataset.scala:2370)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
  at org.apache.spark.sql.Dataset.withCallback(Dataset.scala:2778)
  at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$collect(Dataset.scala:2375)
  at org.apache.spark.sql.Dataset.collect(Dataset.scala:2351)
  ... 48 elided
Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private Foo1 argValue;
/* 010 */   private Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $iw value30 = ($iw) obj1;
/* 239 */     final Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $iw value18 = ($iw) obj;
/* 263 */       final Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

  at org.spark_project.guava.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:306)
  at org.spark_project.guava.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:293)
  at org.spark_project.guava.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
  at org.spark_project.guava.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:135)
  at org.spark_project.guava.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2410)
  at org.spark_project.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2380)
  at org.spark_project.guava.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
  at org.spark_project.guava.cache.LocalCache$Segment.get(LocalCache.java:2257)
  at org.spark_project.guava.cache.LocalCache.get(LocalCache.java:4000)
  at org.spark_project.guava.cache.LocalCache.getOrLoad(LocalCache.java:4004)
  at org.spark_project.guava.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.compile(CodeGenerator.scala:890)
  at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:194)
  at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:36)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator.generate(CodeGenerator.scala:874)
  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection$lzycompute(ExpressionEncoder.scala:272)
  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection(ExpressionEncoder.scala:272)
  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.fromRow(ExpressionEncoder.scala:303)
  ... 65 more
Caused by: java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private Foo1 argValue;
/* 010 */   private Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $iw value30 = ($iw) obj1;
/* 239 */     final Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $iw value18 = ($iw) obj;
/* 263 */       final Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.org$apache$spark$sql$catalyst$expressions$codegen$CodeGenerator$$doCompile(CodeGenerator.scala:941)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:998)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:995)
  at org.spark_project.guava.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
  at org.spark_project.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
  ... 77 more
Caused by: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
  at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:11004)
  at org.codehaus.janino.UnitCompiler.findMostSpecificIInvocable(UnitCompiler.java:8307)
  at org.codehaus.janino.UnitCompiler.invokeConstructor(UnitCompiler.java:7092)
  at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4686)
  at org.codehaus.janino.UnitCompiler.access$8200(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3786)
  at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3762)
  at org.codehaus.janino.Java$NewClassInstance.accept(Java.java:4427)
  at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
  at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
  at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4067)
  at org.codehaus.janino.UnitCompiler.access$7200(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3771)
  at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3762)
  at org.codehaus.janino.Java$ConditionalExpression.accept(Java.java:3877)
  at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
  at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2330)
  at org.codehaus.janino.UnitCompiler.access$2600(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1386)
  at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1370)
  at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(Java.java:2974)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
  at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1436)
  at org.codehaus.janino.UnitCompiler.access$1600(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1376)
  at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1370)
  at org.codehaus.janino.Java$Block.accept(Java.java:2471)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2185)
  at org.codehaus.janino.UnitCompiler.access$1800(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1378)
  at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1370)
  at org.codehaus.janino.Java$IfStatement.accept(Java.java:2621)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
  at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2811)
  at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1262)
  at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1234)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:538)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:890)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:894)
  at org.codehaus.janino.UnitCompiler.access$600(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:377)
  at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:369)
  at org.codehaus.janino.Java$MemberClassDeclaration.accept(Java.java:1128)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
  at org.codehaus.janino.UnitCompiler.compileDeclaredMemberTypes(UnitCompiler.java:1209)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:564)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:420)
  at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:374)
  at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:369)
  at org.codehaus.janino.Java$AbstractPackageMemberClassDeclaration.accept(Java.java:1309)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
  at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:345)
  at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:396)
  at org.codehaus.janino.ClassBodyEvaluator.compileToClass(ClassBodyEvaluator.java:311)
  at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:229)
  at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:196)
  at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:91)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.org$apache$spark$sql$catalyst$expressions$codegen$CodeGenerator$$doCompile(CodeGenerator.scala:935)
  ... 81 more


was (Author: tiddman):
The example above does not exhibit the problem.  Here is a concise example that does.

{quote}% spark-shell
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
17/10/20 14:09:04 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
17/10/20 14:09:08 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
Spark context Web UI available at http://10.10.43.134:4040
Spark context available as 'sc' (master = local[*], app id = local-1508522945163).
Spark session available as 'spark'.
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 2.1.0
      /_/
         
Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131)
Type in expressions to have them evaluated.
Type :help for more information.

scala> case class Foo1(x: Int, s: String, seq: scala.collection.mutable.Seq[Int] = scala.collection.mutable.Seq.empty[Int])
defined class Foo1

scala> val ds1 = Seq(Foo1(1, "a"), Foo1(2, "b")).toDS
ds1: org.apache.spark.sql.Dataset[Foo1] = [x: int, s: string ... 1 more field]

scala> case class Foo2(x: Int, s: String)
defined class Foo2

scala> val ds2 = Seq(Foo2(1, "aa"), Foo2(3, "cc")).toDS
ds2: org.apache.spark.sql.Dataset[Foo2] = [x: int, s: string]

scala> ds1.joinWith(ds2, ds1.col("x") === ds2.col("x")).collect()
17/10/20 14:09:14 ERROR CodeGenerator: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "$line14.$read$$iw$$iw$Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private $line14.$read$$iw$$iw$Foo1 argValue;
/* 010 */   private $line16.$read$$iw$$iw$Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private $line16.$read$$iw$$iw$Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private $line16.$read$$iw$$iw$Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final $line16.$read$$iw$$iw$Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $line16.$read$$iw$$iw value30 = ($line16.$read$$iw$$iw) obj1;
/* 239 */     final $line16.$read$$iw$$iw$Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     $line14.$read$$iw$$iw$Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final $line14.$read$$iw$$iw$Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $line14.$read$$iw$$iw value18 = ($line14.$read$$iw$$iw) obj;
/* 263 */       final $line14.$read$$iw$$iw$Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     $line16.$read$$iw$$iw$Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "$line14.$read$$iw$$iw$Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
	at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:11004)
	at org.codehaus.janino.UnitCompiler.findMostSpecificIInvocable(UnitCompiler.java:8307)
	at org.codehaus.janino.UnitCompiler.invokeConstructor(UnitCompiler.java:7092)
	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4686)
	at org.codehaus.janino.UnitCompiler.access$8200(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3786)
	at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3762)
	at org.codehaus.janino.Java$NewClassInstance.accept(Java.java:4427)
	at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4067)
	at org.codehaus.janino.UnitCompiler.access$7200(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3771)
	at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3762)
	at org.codehaus.janino.Java$ConditionalExpression.accept(Java.java:3877)
	at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2330)
	at org.codehaus.janino.UnitCompiler.access$2600(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1386)
	at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1370)
	at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(Java.java:2974)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
	at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1436)
	at org.codehaus.janino.UnitCompiler.access$1600(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1376)
	at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1370)
	at org.codehaus.janino.Java$Block.accept(Java.java:2471)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2185)
	at org.codehaus.janino.UnitCompiler.access$1800(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1378)
	at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1370)
	at org.codehaus.janino.Java$IfStatement.accept(Java.java:2621)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
	at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2811)
	at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1262)
	at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1234)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:538)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:890)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:894)
	at org.codehaus.janino.UnitCompiler.access$600(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:377)
	at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:369)
	at org.codehaus.janino.Java$MemberClassDeclaration.accept(Java.java:1128)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
	at org.codehaus.janino.UnitCompiler.compileDeclaredMemberTypes(UnitCompiler.java:1209)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:564)
	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:420)
	at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:206)
	at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:374)
	at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:369)
	at org.codehaus.janino.Java$AbstractPackageMemberClassDeclaration.accept(Java.java:1309)
	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
	at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:345)
	at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:396)
	at org.codehaus.janino.ClassBodyEvaluator.compileToClass(ClassBodyEvaluator.java:311)
	at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:229)
	at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:196)
	at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:91)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.org$apache$spark$sql$catalyst$expressions$codegen$CodeGenerator$$doCompile(CodeGenerator.scala:935)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:998)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:995)
	at org.spark_project.guava.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
	at org.spark_project.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
	at org.spark_project.guava.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
	at org.spark_project.guava.cache.LocalCache$Segment.get(LocalCache.java:2257)
	at org.spark_project.guava.cache.LocalCache.get(LocalCache.java:4000)
	at org.spark_project.guava.cache.LocalCache.getOrLoad(LocalCache.java:4004)
	at org.spark_project.guava.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.compile(CodeGenerator.scala:890)
	at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:194)
	at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:36)
	at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator.generate(CodeGenerator.scala:874)
	at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection$lzycompute(ExpressionEncoder.scala:272)
	at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection(ExpressionEncoder.scala:272)
	at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.fromRow(ExpressionEncoder.scala:303)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
	at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1.apply(Dataset.scala:2371)
	at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:57)
	at org.apache.spark.sql.Dataset.withNewExecutionId(Dataset.scala:2765)
	at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$execute$1(Dataset.scala:2370)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
	at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
	at org.apache.spark.sql.Dataset.withCallback(Dataset.scala:2778)
	at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$collect(Dataset.scala:2375)
	at org.apache.spark.sql.Dataset.collect(Dataset.scala:2351)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>(<console>:32)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>(<console>:37)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw$$iw.<init>(<console>:39)
	at $line18.$read$$iw$$iw$$iw$$iw$$iw.<init>(<console>:41)
	at $line18.$read$$iw$$iw$$iw$$iw.<init>(<console>:43)
	at $line18.$read$$iw$$iw$$iw.<init>(<console>:45)
	at $line18.$read$$iw$$iw.<init>(<console>:47)
	at $line18.$read$$iw.<init>(<console>:49)
	at $line18.$read.<init>(<console>:51)
	at $line18.$read$.<init>(<console>:55)
	at $line18.$read$.<clinit>(<console>)
	at $line18.$eval$.$print$lzycompute(<console>:7)
	at $line18.$eval$.$print(<console>:6)
	at $line18.$eval.$print(<console>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:786)
	at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:1047)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest$$anonfun$loadAndRunReq$1.apply(IMain.scala:638)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest$$anonfun$loadAndRunReq$1.apply(IMain.scala:637)
	at scala.reflect.internal.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)
	at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:19)
	at scala.tools.nsc.interpreter.IMain$WrappedRequest.loadAndRunReq(IMain.scala:637)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:569)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:565)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:807)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:681)
	at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:395)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:415)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:923)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:909)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:909)
	at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:909)
	at org.apache.spark.repl.Main$.doMain(Main.scala:68)
	at org.apache.spark.repl.Main$.main(Main.scala:51)
	at org.apache.spark.repl.Main.main(Main.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:738)
	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)
	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
java.lang.RuntimeException: Error while decoding: java.util.concurrent.ExecutionException: java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private Foo1 argValue;
/* 010 */   private Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $iw value30 = ($iw) obj1;
/* 239 */     final Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $iw value18 = ($iw) obj;
/* 263 */       final Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

newInstance(class scala.Tuple2)
:- if (isnull(input[0, struct<x:int,s:string,seq:array<int>>, false])) null else newInstance(class Foo1)
:  :- isnull(input[0, struct<x:int,s:string,seq:array<int>>, false])
:  :  +- input[0, struct<x:int,s:string,seq:array<int>>, false]
:  :- null
:  +- newInstance(class Foo1)
:     :- assertnotnull(input[0, struct<x:int,s:string,seq:array<int>>, false].x, - field (class: "scala.Int", name: "x"), - root class: "Foo1")
:     :  +- input[0, struct<x:int,s:string,seq:array<int>>, false].x
:     :     +- input[0, struct<x:int,s:string,seq:array<int>>, false]
:     :- input[0, struct<x:int,s:string,seq:array<int>>, false].s.toString
:     :  +- input[0, struct<x:int,s:string,seq:array<int>>, false].s
:     :     +- input[0, struct<x:int,s:string,seq:array<int>>, false]
:     +- staticinvoke(class scala.collection.mutable.WrappedArray$, ObjectType(interface scala.collection.Seq), make, mapobjects(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType, assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1"), input[0, struct<x:int,s:string,seq:array<int>>, false].seq).array, true)
:        +- mapobjects(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType, assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1"), input[0, struct<x:int,s:string,seq:array<int>>, false].seq).array
:           +- mapobjects(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType, assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1"), input[0, struct<x:int,s:string,seq:array<int>>, false].seq)
:              :- assertnotnull(lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType), - array element class: "scala.Int", - field (class: "scala.collection.mutable.Seq", name: "seq"), - root class: "Foo1")
:              :  +- lambdavariable(MapObjects_loopValue0, MapObjects_loopIsNull1, IntegerType)
:              +- input[0, struct<x:int,s:string,seq:array<int>>, false].seq
:                 +- input[0, struct<x:int,s:string,seq:array<int>>, false]
+- if (isnull(input[1, struct<x:int,s:string>, false])) null else newInstance(class Foo2)
   :- isnull(input[1, struct<x:int,s:string>, false])
   :  +- input[1, struct<x:int,s:string>, false]
   :- null
   +- newInstance(class Foo2)
      :- assertnotnull(input[1, struct<x:int,s:string>, false].x, - field (class: "scala.Int", name: "x"), - root class: "Foo2")
      :  +- input[1, struct<x:int,s:string>, false].x
      :     +- input[1, struct<x:int,s:string>, false]
      +- input[1, struct<x:int,s:string>, false].s.toString
         +- input[1, struct<x:int,s:string>, false].s
            +- input[1, struct<x:int,s:string>, false]

  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.fromRow(ExpressionEncoder.scala:306)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1$$anonfun$apply$12.apply(Dataset.scala:2371)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
  at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
  at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
  at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
  at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1.apply(Dataset.scala:2371)
  at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:57)
  at org.apache.spark.sql.Dataset.withNewExecutionId(Dataset.scala:2765)
  at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$execute$1(Dataset.scala:2370)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
  at org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$collect$1.apply(Dataset.scala:2375)
  at org.apache.spark.sql.Dataset.withCallback(Dataset.scala:2778)
  at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$collect(Dataset.scala:2375)
  at org.apache.spark.sql.Dataset.collect(Dataset.scala:2351)
  ... 48 elided
Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private Foo1 argValue;
/* 010 */   private Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $iw value30 = ($iw) obj1;
/* 239 */     final Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $iw value18 = ($iw) obj;
/* 263 */       final Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

  at org.spark_project.guava.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:306)
  at org.spark_project.guava.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:293)
  at org.spark_project.guava.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
  at org.spark_project.guava.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:135)
  at org.spark_project.guava.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2410)
  at org.spark_project.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2380)
  at org.spark_project.guava.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
  at org.spark_project.guava.cache.LocalCache$Segment.get(LocalCache.java:2257)
  at org.spark_project.guava.cache.LocalCache.get(LocalCache.java:4000)
  at org.spark_project.guava.cache.LocalCache.getOrLoad(LocalCache.java:4004)
  at org.spark_project.guava.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.compile(CodeGenerator.scala:890)
  at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:194)
  at org.apache.spark.sql.catalyst.expressions.codegen.GenerateSafeProjection$.create(GenerateSafeProjection.scala:36)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator.generate(CodeGenerator.scala:874)
  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection$lzycompute(ExpressionEncoder.scala:272)
  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.constructProjection(ExpressionEncoder.scala:272)
  at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.fromRow(ExpressionEncoder.scala:303)
  ... 65 more
Caused by: java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
/* 001 */ public java.lang.Object generate(Object[] references) {
/* 002 */   return new SpecificSafeProjection(references);
/* 003 */ }
/* 004 */
/* 005 */ class SpecificSafeProjection extends org.apache.spark.sql.catalyst.expressions.codegen.BaseProjection {
/* 006 */
/* 007 */   private Object[] references;
/* 008 */   private InternalRow mutableRow;
/* 009 */   private Foo1 argValue;
/* 010 */   private Foo2 argValue1;
/* 011 */   private int argValue2;
/* 012 */   private java.lang.String argValue3;
/* 013 */   private scala.collection.Seq argValue4;
/* 014 */   private boolean resultIsNull;
/* 015 */   private java.lang.Object[] argValue5;
/* 016 */   private boolean MapObjects_loopIsNull1;
/* 017 */   private int MapObjects_loopValue0;
/* 018 */   private int argValue6;
/* 019 */   private java.lang.String argValue7;
/* 020 */   private boolean isNull31;
/* 021 */   private boolean value31;
/* 022 */   private boolean isNull32;
/* 023 */   private Foo2 value32;
/* 024 */   private boolean isNull33;
/* 025 */   private Foo2 value33;
/* 026 */
/* 027 */   public SpecificSafeProjection(Object[] references) {
/* 028 */     this.references = references;
/* 029 */     mutableRow = (InternalRow) references[references.length - 1];
/* 030 */
/* 031 */
/* 032 */
/* 033 */
/* 034 */
/* 035 */
/* 036 */
/* 037 */
/* 038 */
/* 039 */
/* 040 */
/* 041 */     isNull31 = false;
/* 042 */     value31 = false;
/* 043 */     isNull32 = false;
/* 044 */     value32 = null;
/* 045 */     isNull33 = false;
/* 046 */     value33 = null;
/* 047 */
/* 048 */   }
/* 049 */
/* 050 */   public void initialize(int partitionIndex) {
/* 051 */
/* 052 */   }
/* 053 */
/* 054 */
/* 055 */   private void evalIfTrueExpr(InternalRow i) {
/* 056 */     final Foo2 value22 = null;
/* 057 */     isNull32 = true;
/* 058 */     value32 = value22;
/* 059 */   }
/* 060 */
/* 061 */
/* 062 */   private void apply_1(InternalRow i) {
/* 063 */
/* 064 */
/* 065 */     resultIsNull = false;
/* 066 */     if (!resultIsNull) {
/* 067 */
/* 068 */       InternalRow value16 = i.getStruct(0, 3);
/* 069 */       boolean isNull15 = false;
/* 070 */       ArrayData value15 = null;
/* 071 */
/* 072 */
/* 073 */       if (value16.isNullAt(2)) {
/* 074 */         isNull15 = true;
/* 075 */       } else {
/* 076 */         value15 = value16.getArray(2);
/* 077 */       }
/* 078 */       ArrayData value14 = null;
/* 079 */
/* 080 */       if (!isNull15) {
/* 081 */
/* 082 */         Integer[] convertedArray = null;
/* 083 */         int dataLength = value15.numElements();
/* 084 */         convertedArray = new Integer[dataLength];
/* 085 */
/* 086 */         int loopIndex = 0;
/* 087 */         while (loopIndex < dataLength) {
/* 088 */           MapObjects_loopValue0 = (int) (value15.getInt(loopIndex));
/* 089 */           MapObjects_loopIsNull1 = value15.isNullAt(loopIndex);
/* 090 */
/* 091 */
/* 092 */           if (MapObjects_loopIsNull1) {
/* 093 */             throw new RuntimeException(((java.lang.String) references[1]));
/* 094 */           }
/* 095 */           if (false) {
/* 096 */             convertedArray[loopIndex] = null;
/* 097 */           } else {
/* 098 */             convertedArray[loopIndex] = MapObjects_loopValue0;
/* 099 */           }
/* 100 */
/* 101 */           loopIndex += 1;
/* 102 */         }
/* 103 */
/* 104 */         value14 = new org.apache.spark.sql.catalyst.util.GenericArrayData(convertedArray);
/* 105 */       }
/* 106 */       boolean isNull13 = true;
/* 107 */       java.lang.Object[] value13 = null;
/* 108 */       if (!isNull15) {
/* 109 */
/* 110 */         isNull13 = false;
/* 111 */         if (!isNull13) {
/* 112 */
/* 113 */           Object funcResult1 = null;
/* 114 */           funcResult1 = value14.array();
/* 115 */           if (funcResult1 == null) {
/* 116 */             isNull13 = true;
/* 117 */           } else {
/* 118 */             value13 = (java.lang.Object[]) funcResult1;
/* 119 */           }
/* 120 */
/* 121 */         }
/* 122 */         isNull13 = value13 == null;
/* 123 */       }
/* 124 */       resultIsNull = isNull13;
/* 125 */       argValue5 = value13;
/* 126 */     }
/* 127 */
/* 128 */     boolean isNull12 = resultIsNull;
/* 129 */     final scala.collection.Seq value12 = resultIsNull ? null : scala.collection.mutable.WrappedArray.make(argValue5);
/* 130 */     isNull12 = value12 == null;
/* 131 */     argValue4 = value12;
/* 132 */
/* 133 */   }
/* 134 */
/* 135 */
/* 136 */   private void evalIfCondExpr(InternalRow i) {
/* 137 */     InternalRow value21 = i.getStruct(1, 2);
/* 138 */     isNull31 = false;
/* 139 */     value31 = false;
/* 140 */   }
/* 141 */
/* 142 */
/* 143 */   private void apply_0(InternalRow i) {
/* 144 */
/* 145 */
/* 146 */     boolean isNull7 = false;
/* 147 */
/* 148 */     InternalRow value8 = i.getStruct(0, 3);
/* 149 */     int value7 = -1;
/* 150 */
/* 151 */     value7 = value8.getInt(0);
/* 152 */
/* 153 */     if (false) {
/* 154 */       throw new RuntimeException(((java.lang.String) references[0]));
/* 155 */     }
/* 156 */     argValue2 = value7;
/* 157 */
/* 158 */
/* 159 */     InternalRow value11 = i.getStruct(0, 3);
/* 160 */     boolean isNull10 = false;
/* 161 */     UTF8String value10 = null;
/* 162 */
/* 163 */
/* 164 */     if (value11.isNullAt(1)) {
/* 165 */       isNull10 = true;
/* 166 */     } else {
/* 167 */       value10 = value11.getUTF8String(1);
/* 168 */     }
/* 169 */     boolean isNull9 = true;
/* 170 */     java.lang.String value9 = null;
/* 171 */     if (!isNull10) {
/* 172 */
/* 173 */       isNull9 = false;
/* 174 */       if (!isNull9) {
/* 175 */
/* 176 */         Object funcResult = null;
/* 177 */         funcResult = value10.toString();
/* 178 */         if (funcResult == null) {
/* 179 */           isNull9 = true;
/* 180 */         } else {
/* 181 */           value9 = (java.lang.String) funcResult;
/* 182 */         }
/* 183 */
/* 184 */       }
/* 185 */       isNull9 = value9 == null;
/* 186 */     }
/* 187 */     argValue3 = value9;
/* 188 */
/* 189 */   }
/* 190 */
/* 191 */
/* 192 */   private void evalIfFalseExpr(InternalRow i) {
/* 193 */     boolean isNull25 = false;
/* 194 */
/* 195 */     InternalRow value26 = i.getStruct(1, 2);
/* 196 */     int value25 = -1;
/* 197 */
/* 198 */     value25 = value26.getInt(0);
/* 199 */
/* 200 */     if (false) {
/* 201 */       throw new RuntimeException(((java.lang.String) references[3]));
/* 202 */     }
/* 203 */     argValue6 = value25;
/* 204 */
/* 205 */
/* 206 */     InternalRow value29 = i.getStruct(1, 2);
/* 207 */     boolean isNull28 = false;
/* 208 */     UTF8String value28 = null;
/* 209 */
/* 210 */
/* 211 */     if (value29.isNullAt(1)) {
/* 212 */       isNull28 = true;
/* 213 */     } else {
/* 214 */       value28 = value29.getUTF8String(1);
/* 215 */     }
/* 216 */     boolean isNull27 = true;
/* 217 */     java.lang.String value27 = null;
/* 218 */     if (!isNull28) {
/* 219 */
/* 220 */       isNull27 = false;
/* 221 */       if (!isNull27) {
/* 222 */
/* 223 */         Object funcResult2 = null;
/* 224 */         funcResult2 = value28.toString();
/* 225 */         if (funcResult2 == null) {
/* 226 */           isNull27 = true;
/* 227 */         } else {
/* 228 */           value27 = (java.lang.String) funcResult2;
/* 229 */         }
/* 230 */
/* 231 */       }
/* 232 */       isNull27 = value27 == null;
/* 233 */     }
/* 234 */     argValue7 = value27;
/* 235 */
/* 236 */
/* 237 */     Object obj1 = ((Expression) references[4]).eval(null);
/* 238 */     $iw value30 = ($iw) obj1;
/* 239 */     final Foo2 value23 = false ? null : value30.new Foo2(argValue6, argValue7);
/* 240 */     isNull33 = false;
/* 241 */     value33 = value23;
/* 242 */   }
/* 243 */
/* 244 */
/* 245 */   public java.lang.Object apply(java.lang.Object _i) {
/* 246 */     InternalRow i = (InternalRow) _i;
/* 247 */
/* 248 */     InternalRow value3 = i.getStruct(0, 3);
/* 249 */     boolean isNull1 = false;
/* 250 */     Foo1 value1 = null;
/* 251 */     if (!false && false) {
/* 252 */
/* 253 */       final Foo1 value4 = null;
/* 254 */       isNull1 = true;
/* 255 */       value1 = value4;
/* 256 */     } else {
/* 257 */
/* 258 */       apply_0(i);
/* 259 */       apply_1(i);
/* 260 */
/* 261 */       Object obj = ((Expression) references[2]).eval(null);
/* 262 */       $iw value18 = ($iw) obj;
/* 263 */       final Foo1 value5 = false ? null : value18.new Foo1(argValue2, argValue3, argValue4);
/* 264 */       isNull1 = false;
/* 265 */       value1 = value5;
/* 266 */     }
/* 267 */     argValue = value1;
/* 268 */
/* 269 */
/* 270 */     evalIfCondExpr(i);
/* 271 */     boolean isNull19 = false;
/* 272 */     Foo2 value19 = null;
/* 273 */     if (!isNull31 && value31) {
/* 274 */       evalIfTrueExpr(i);
/* 275 */       isNull19 = isNull32;
/* 276 */       value19 = value32;
/* 277 */     } else {
/* 278 */       evalIfFalseExpr(i);
/* 279 */       isNull19 = isNull33;
/* 280 */       value19 = value33;
/* 281 */     }
/* 282 */     argValue1 = value19;
/* 283 */
/* 284 */
/* 285 */     final scala.Tuple2 value = false ? null : new scala.Tuple2(argValue, argValue1);
/* 286 */     if (false) {
/* 287 */       mutableRow.setNullAt(0);
/* 288 */     } else {
/* 289 */
/* 290 */       mutableRow.update(0, value);
/* 291 */     }
/* 292 */
/* 293 */     return mutableRow;
/* 294 */   }
/* 295 */ }

  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.org$apache$spark$sql$catalyst$expressions$codegen$CodeGenerator$$doCompile(CodeGenerator.scala:941)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:998)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$$anon$1.load(CodeGenerator.scala:995)
  at org.spark_project.guava.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
  at org.spark_project.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
  ... 77 more
Caused by: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 263, Column 69: No applicable constructor/method found for actual parameters "int, java.lang.String, scala.collection.Seq"; candidates are: "Foo1(int, java.lang.String, scala.collection.mutable.Seq)"
  at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:11004)
  at org.codehaus.janino.UnitCompiler.findMostSpecificIInvocable(UnitCompiler.java:8307)
  at org.codehaus.janino.UnitCompiler.invokeConstructor(UnitCompiler.java:7092)
  at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4686)
  at org.codehaus.janino.UnitCompiler.access$8200(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3786)
  at org.codehaus.janino.UnitCompiler$12.visitNewClassInstance(UnitCompiler.java:3762)
  at org.codehaus.janino.Java$NewClassInstance.accept(Java.java:4427)
  at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
  at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
  at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:4067)
  at org.codehaus.janino.UnitCompiler.access$7200(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3771)
  at org.codehaus.janino.UnitCompiler$12.visitConditionalExpression(UnitCompiler.java:3762)
  at org.codehaus.janino.Java$ConditionalExpression.accept(Java.java:3877)
  at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:3762)
  at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:4933)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2330)
  at org.codehaus.janino.UnitCompiler.access$2600(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1386)
  at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1370)
  at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(Java.java:2974)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
  at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:1436)
  at org.codehaus.janino.UnitCompiler.access$1600(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1376)
  at org.codehaus.janino.UnitCompiler$6.visitBlock(UnitCompiler.java:1370)
  at org.codehaus.janino.Java$Block.accept(Java.java:2471)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2185)
  at org.codehaus.janino.UnitCompiler.access$1800(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1378)
  at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1370)
  at org.codehaus.janino.Java$IfStatement.accept(Java.java:2621)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1370)
  at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1450)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2811)
  at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1262)
  at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1234)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:538)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:890)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:894)
  at org.codehaus.janino.UnitCompiler.access$600(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:377)
  at org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:369)
  at org.codehaus.janino.Java$MemberClassDeclaration.accept(Java.java:1128)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
  at org.codehaus.janino.UnitCompiler.compileDeclaredMemberTypes(UnitCompiler.java:1209)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:564)
  at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:420)
  at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:206)
  at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:374)
  at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:369)
  at org.codehaus.janino.Java$AbstractPackageMemberClassDeclaration.accept(Java.java:1309)
  at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
  at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:345)
  at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:396)
  at org.codehaus.janino.ClassBodyEvaluator.compileToClass(ClassBodyEvaluator.java:311)
  at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:229)
  at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:196)
  at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:91)
  at org.apache.spark.sql.catalyst.expressions.codegen.CodeGenerator$.org$apache$spark$sql$catalyst$expressions$codegen$CodeGenerator$$doCompile(CodeGenerator.scala:935)
  ... 81 more
{quote}


> CodeGenerator - failed to compile when constructor has scala.collection.mutable.Seq vs. scala.collection.Seq
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-22296
>                 URL: https://issues.apache.org/jira/browse/SPARK-22296
>             Project: Spark
>          Issue Type: Bug
>          Components: Optimizer
>    Affects Versions: 2.1.0
>            Reporter: Randy Tidd
>
> This is with Scala 2.11.
> We have a case class that has a constructor with 85 args, the last two of which are:
>                      var chargesInst : scala.collection.mutable.Seq[ChargeInstitutional] = scala.collection.mutable.Seq.empty[ChargeInstitutional],
>                      var chargesProf : scala.collection.mutable.Seq[ChargeProfessional] = scala.collection.mutable.Seq.empty[ChargeProfessional]
> A mutable Seq in a the constructor of a case class is probably poor form but Scala allows it.  When we run this job we get this error:
> build   17-Oct-2017 05:30:50        2017-10-17 09:30:50 [Executor task launch worker-1] ERROR o.a.s.s.c.e.codegen.CodeGenerator - failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 8217, Column 70: No applicable constructor/method found for actual parameters "java.lang.String, java.lang.String, long, java.lang.String, long, long, long, java.lang.String, long, long, double, scala.Option, scala.Option, java.lang.String, java.lang.String, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, long, long, long, long, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, java.lang.String, int, double, double, java.lang.String, java.lang.String, java.lang.String, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, long, long, long, java.lang.String, com.xyz.xyz.xyz.domain.Patient, com.xyz.xyz.xyz.domain.Physician, scala.collection.Seq, scala.collection.Seq, java.lang.String, long, java.lang.String, int, int, boolean, boolean, scala.collection.Seq, boolean, scala.collection.Seq, boolean, scala.collection.Seq, scala.collection.Seq"; candidates are: "com.xyz.xyz.xyz.domain.Account(java.lang.String, java.lang.String, long, java.lang.String, long, long, long, java.lang.String, long, long, double, scala.Option, scala.Option, java.lang.String, java.lang.String, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, long, long, long, long, scala.Option, scala.Option, scala.Option, scala.Option, scala.Option, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, java.lang.String, int, double, double, java.lang.String, java.lang.String, java.lang.String, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, long, long, long, java.lang.String, com.xyz.xyz.xyz.domain.Patient, com.xyz.xyz.xyz.domain.Physician, scala.collection.Seq, scala.collection.Seq, java.lang.String, long, java.lang.String, int, int, boolean, boolean, scala.collection.Seq, boolean, scala.collection.Seq, boolean, scala.collection.mutable.Seq, scala.collection.mutable.Seq)"
> The relevant lines are:
> build   17-Oct-2017 05:30:50        /* 093 */   private scala.collection.Seq argValue84;
> build   17-Oct-2017 05:30:50        /* 094 */   private scala.collection.Seq argValue85;
> and
> build   17-Oct-2017 05:30:54        /* 8217 */     final com.xyz.xyz.xyz.domain.Account value1 = false ? null : new com.xyz.xyz.xyz.domain.Account(argValue2, argValue3, argValue4, argValue5, argValue6, argValue7, argValue8, argValue9, argValue10, argValue11, argValue12, argValue13, argValue14, argValue15, argValue16, argValue17, argValue18, argValue19, argValue20, argValue21, argValue22, argValue23, argValue24, argValue25, argValue26, argValue27, argValue28, argValue29, argValue30, argValue31, argValue32, argValue33, argValue34, argValue35, argValue36, argValue37, argValue38, argValue39, argValue40, argValue41, argValue42, argValue43, argValue44, argValue45, argValue46, argValue47, argValue48, argValue49, argValue50, argValue51, argValue52, argValue53, argValue54, argValue55, argValue56, argValue57, argValue58, argValue59, argValue60, argValue61, argValue62, argValue63, argValue64, argValue65, argValue66, argValue67, argValue68, argValue69, argValue70, argValue71, argValue72, argValue73, argValue74, argValue75, argValue76, argValue77, argValue78, argValue79, argValue80, argValue81, argValue82, argValue83, argValue84, argValue85);
> In short, Spark uses scala.collection.Seq in the generated code which is not compatible with scala.collection.mutable.Seq in our case class, which results in a failure at runtime. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org