Skip to content

Commit

Permalink
[SPARK-2730][SQL] When retrieving a value from a Map, GetItem evaluat…
Browse files Browse the repository at this point in the history
…es key twice

JIRA: https://issues.apache.org/jira/browse/SPARK-2730

Author: Yin Huai <huai@cse.ohio-state.edu>

Closes apache#1637 from yhuai/SPARK-2730 and squashes the following commits:

1a9f24e [Yin Huai] Remove unnecessary key evaluation.
  • Loading branch information
yhuai authored and conviva-zz committed Sep 4, 2014
1 parent 73d98fa commit aa019cc
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ case class GetItem(child: Expression, ordinal: Expression) extends Expression {
}
} else {
val baseValue = value.asInstanceOf[Map[Any, _]]
val key = ordinal.eval(input)
baseValue.get(key).orNull
}
}
Expand Down

0 comments on commit aa019cc

Please sign in to comment.