Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
Ngone51 committed Jun 19, 2020
commit e6bb55d78282d70b41e49a93f102f103740b59b9
Original file line number Diff line number Diff line change
Expand Up @@ -1101,10 +1101,13 @@ case class ScalaUDF(
|Object $argTerm = ${eval.isNull} ? null : $convertedTerm;
""".stripMargin
} else if (useEncoders(i)) {
val convInput = ctx.freshName("convInput")
s"""
|Object $convInput = ${eval.isNull} ? null : (Object) ${eval.value};
|Object $argTerm = $convertersTerm[$i].apply($convInput);
|Object $argTerm = null;
|if (${eval.isNull}) {
| $argTerm = $convertersTerm[$i].apply(null);
|} else {
| $argTerm = $convertersTerm[$i].apply(${eval.value});
|}
""".stripMargin
} else {
s"Object $argTerm = ${eval.isNull} ? null : $convertersTerm[$i].apply(${eval.value});"
Expand Down