Skip to content

Commit 38e8a99

Browse files
committed
Whoops, getOrDefault is also new in Java 8.
1 parent b1a7646 commit 38e8a99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ object BindReferences extends Logging {
9898
}
9999
expression.transform { case a: AttributeReference =>
100100
attachTree(a, "Binding attribute") {
101-
val ordinal = inputToOrdinal.getOrDefault(a.exprId, -1)
101+
val ordinal = Option(inputToOrdinal.get(a.exprId)).getOrElse(-1)
102102
if (ordinal == -1) {
103103
if (allowFailures) {
104104
a

0 commit comments

Comments
 (0)