Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ case class GetArrayItem(child: Expression, ordinal: Expression)
* We need to do type checking here as `key` expression maybe unresolved.
*/
case class GetMapValue(child: Expression, key: Expression)
extends BinaryExpression with ExpectsInputTypes with ExtractValue {
extends BinaryExpression with ImplicitCastInputTypes with ExtractValue {

private def keyType = child.dataType.asInstanceOf[MapType].keyType

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,18 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
}
}


test("SPARK-17108: Fix BIGINT and INT comparison failure in spark sql") {
sql("create table t1(a map<bigint, array<string>>)")
sql("select * from t1 where a[1] is not null")

sql("create table t2(a map<int, array<string>>)")
sql("select * from t2 where a[1] is not null")

sql("create table t3(a map<bigint, array<string>>)")
sql("select * from t3 where a[1L] is not null")
}

test("SPARK-17796 Support wildcard character in filename for LOAD DATA LOCAL INPATH") {
withTempDir { dir =>
for (i <- 1 to 3) {
Expand Down