Skip to content
Snippets Groups Projects
Commit e3643485 authored by Yin Huai's avatar Yin Huai Committed by Michael Armbrust
Browse files

[SPARK-2730][SQL] When retrieving a value from a Map, GetItem evaluates key twice

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

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

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

1a9f24e [Yin Huai] Remove unnecessary key evaluation.
parent 0c5c6a63
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment