cloud-fan commented on a change in pull request #30297:
URL: https://github.com/apache/spark/pull/30297#discussion_r521837245
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeExtractors.scala
##########
@@ -251,15 +273,28 @@ case class GetArrayItem(child: Expression, ordinal:
Expression)
nullSafeCodeGen(ctx, ev, (eval1, eval2) => {
val index = ctx.freshName("index")
val nullCheck = if (child.dataType.asInstanceOf[ArrayType].containsNull)
{
- s" || $eval1.isNullAt($index)"
+ s"""else if ($eval1.isNullAt($index)) {
+ ${ev.isNull} = true;
+ }
+ """
} else {
""
}
+
+ val failOnErrorBranch = if (failOnError) {
Review comment:
nit: it should be `indexOutOfBoundBranch`
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
##########
@@ -2042,10 +2039,20 @@ case class ElementAt(left: Expression, right:
Expression)
} else {
""
}
+
+ val failOnErrorBranch = if (failOnError) {
Review comment:
nit: it should be `indexOutOfBoundBranch`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]