Github user viirya commented on the issue: https://github.com/apache/spark/pull/15693 @kiszk the part of generated codes are posted as follows. Before this patch: Notice that line 239 `funcResult3 = value4._2();`, `value4` cannot be accessed. /* 288 */ public java.lang.Object apply(java.lang.Object _i) { /* 289 */ InternalRow i = (InternalRow) _i; /* 290 */ /* 291 */ /* 292 */ /* 293 */ Object obj = ((Expression) references[0]).eval(null); /* 294 */ scala.Tuple2 value1 = (scala.Tuple2) obj; /* 295 */ /* 296 */ boolean isNull2 = false; /* 297 */ boolean value2 = false; /* 298 */ if (!isNull2) { /* 299 */ /* 300 */ Object funcResult = null; /* 301 */ funcResult = value1._1(); /* 302 */ if (funcResult == null) { /* 303 */ isNull2 = true; /* 304 */ } else { /* 305 */ value2 = (Boolean) funcResult; /* 306 */ } /* 307 */ /* 308 */ } /* 309 */ this.isNull_0 = isNull2; /* 310 */ this.value_0 = value2; /* 311 */ /* 312 */ /* 313 */ Object obj1 = ((Expression) references[1]).eval(null); /* 314 */ scala.Tuple2 value4 = (scala.Tuple2) obj1; /* 315 */ /* 316 */ boolean isNull8 = false; /* 317 */ org.apache.spark.sql.GroupedRoutes value8 = null; /* 318 */ if (!isNull8) { /* 319 */ /* 320 */ Object funcResult1 = null; /* 321 */ funcResult1 = value4._2(); /* 322 */ if (funcResult1 == null) { /* 323 */ isNull8 = true; /* 324 */ } else { /* 325 */ value8 = (org.apache.spark.sql.GroupedRoutes) funcResult1; /* 326 */ } /* 327 */ /* 328 */ } ... /* 232 */ private void apply1_0(InternalRow i) { /* 233 */ /* 234 */ boolean isNull17 = false; /* 235 */ org.apache.spark.sql.GroupedRoutes value17 = null; /* 236 */ if (!isNull17) { /* 237 */ /* 238 */ Object funcResult3 = null; /* 239 */ funcResult3 = value4._2(); /* 240 */ if (funcResult3 == null) { /* 241 */ isNull17 = true; /* 242 */ } else { /* 243 */ value17 = (org.apache.spark.sql.GroupedRoutes) funcResult3; /* 244 */ } /* 245 */ /* 246 */ } /* 247 */ isNull17 = value17 == null; /* 248 */ /* 249 */ if (isNull17) { /* 250 */ throw new RuntimeException(((java.lang.String) references[3])); /* 251 */ } /* 252 */ After this patch: /* 292 */ public java.lang.Object apply(java.lang.Object _i) { /* 293 */ InternalRow i = (InternalRow) _i; /* 294 */ /* 295 */ /* 296 */ /* 297 */ Object obj = ((Expression) references[0]).eval(null); /* 298 */ scala.Tuple2 value1 = (scala.Tuple2) obj; /* 299 */ classChildVar = value1; /* 300 */ classChildVarIsNull = false; /* 301 */ boolean isNull2 = classChildVarIsNull; /* 302 */ boolean value2 = false; /* 303 */ if (!isNull2) { /* 304 */ /* 305 */ Object funcResult = null; /* 306 */ funcResult = classChildVar._1(); /* 307 */ if (funcResult == null) { /* 308 */ isNull2 = true; /* 309 */ } else { /* 310 */ value2 = (Boolean) funcResult; /* 311 */ } /* 312 */ /* 313 */ } /* 314 */ this.isNull_0 = isNull2; /* 315 */ this.value_0 = value2; /* 316 */ /* 317 */ /* 318 */ Object obj1 = ((Expression) references[1]).eval(null); /* 319 */ scala.Tuple2 value4 = (scala.Tuple2) obj1; /* 320 */ classChildVar1 = value4; /* 321 */ classChildVarIsNull1 = false; /* 322 */ boolean isNull8 = classChildVarIsNull1; /* 323 */ org.apache.spark.sql.GroupedRoutes value8 = null; /* 324 */ if (!isNull8) { /* 325 */ /* 326 */ Object funcResult1 = null; /* 327 */ funcResult1 = classChildVar1._2(); /* 328 */ if (funcResult1 == null) { /* 329 */ isNull8 = true; /* 330 */ } else { /* 331 */ value8 = (org.apache.spark.sql.GroupedRoutes) funcResult1; /* 332 */ } /* 333 */ /* 334 */ } /* 335 */ isNull8 = value8 == null; ... /* 236 */ private void apply1_0(InternalRow i) { /* 237 */ /* 238 */ boolean isNull17 = classChildVarIsNull1; /* 239 */ org.apache.spark.sql.GroupedRoutes value17 = null; /* 240 */ if (!isNull17) { /* 241 */ /* 242 */ Object funcResult3 = null; /* 243 */ funcResult3 = classChildVar1._2(); /* 244 */ if (funcResult3 == null) { /* 245 */ isNull17 = true; /* 246 */ } else { /* 247 */ value17 = (org.apache.spark.sql.GroupedRoutes) funcResult3; /* 248 */ } /* 249 */ /* 250 */ } /* 251 */ isNull17 = value17 == null; /* 252 */ /* 253 */ if (isNull17) { /* 254 */ throw new RuntimeException(((java.lang.String) references[3])); /* 255 */ } /* 256 */ /* 257 */ boolean isNull15 = false; /* 258 */ java.lang.String value15 = null; /* 259 */ if (!isNull15) { /* 260 */ /* 261 */ Object funcResult4 = null; /* 262 */ funcResult4 = value17.src(); /* 263 */ if (funcResult4 == null) { /* 264 */ isNull15 = true; /* 265 */ } else { /* 266 */ value15 = (java.lang.String) funcResult4; /* 267 */ } /* 268 */ /* 269 */ } /* 270 */ isNull15 = value15 == null; /* 271 */ boolean isNull14 = isNull15; /* 272 */ final UTF8String value14 = isNull14 ? null : org.apache.spark.unsafe.types.UTF8String.fromString(value15); /* 273 */ isNull14 = value14 == null; /* 274 */ if (isNull14) { /* 275 */ values[0] = null; /* 276 */ } else { /* 277 */ values[0] = value14; /* 278 */ } /* 279 */ } /* 280 */
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org