Skip to content

Commit 4b161a4

Browse files
committed
naming.
Change-Id: I719078352ab04f3ab096e62fd2b6a1c06bbdffd3
1 parent 36d235a commit 4b161a4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,7 @@ case class ElementAt(
20402040
""
20412041
}
20422042

2043-
val failOnErrorBranch = if (failOnError) {
2043+
val indexOutOfBoundBranch = if (failOnError) {
20442044
s"""throw new ArrayIndexOutOfBoundsException(
20452045
| "Invalid index: " + $index + ", numElements: " + $eval1.numElements()
20462046
|);
@@ -2052,7 +2052,7 @@ case class ElementAt(
20522052
s"""
20532053
|int $index = (int) $eval2;
20542054
|if ($eval1.numElements() < Math.abs($index)) {
2055-
| $failOnErrorBranch
2055+
| $indexOutOfBoundBranch
20562056
|} else {
20572057
| if ($index == 0) {
20582058
| throw new ArrayIndexOutOfBoundsException("SQL array indices start at 1");

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeExtractors.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ case class GetArrayItem(
281281
""
282282
}
283283

284-
val failOnErrorBranch = if (failOnError) {
284+
val indexOutOfBoundBranch = if (failOnError) {
285285
s"""throw new ArrayIndexOutOfBoundsException(
286286
| "Invalid index: " + $index + ", numElements: " + $eval1.numElements()
287287
|);
@@ -293,7 +293,7 @@ case class GetArrayItem(
293293
s"""
294294
final int $index = (int) $eval2;
295295
if ($index >= $eval1.numElements() || $index < 0) {
296-
$failOnErrorBranch
296+
$indexOutOfBoundBranch
297297
} $nullCheck else {
298298
${ev.value} = ${CodeGenerator.getValue(eval1, dataType, index)};
299299
}

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ case class Elt(
338338
""".stripMargin
339339
}.mkString)
340340

341-
val failOnErrorBranch = if (failOnError) {
341+
val indexOutOfBoundBranch = if (failOnError) {
342342
s"""
343343
|if (!$indexMatched) {
344344
| throw new ArrayIndexOutOfBoundsException(
@@ -358,7 +358,7 @@ case class Elt(
358358
|do {
359359
| $codes
360360
|} while (false);
361-
|$failOnErrorBranch
361+
|$indexOutOfBoundBranch
362362
|final ${CodeGenerator.javaType(dataType)} ${ev.value} = $inputVal;
363363
|final boolean ${ev.isNull} = ${ev.value} == null;
364364
""".stripMargin)

0 commit comments

Comments
 (0)