Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Remove from sql.functions.
  • Loading branch information
dongjoon-hyun committed Jul 2, 2016
commit 8db1e656f27aa1647fca7c86405959262c3365fd
16 changes: 0 additions & 16 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2760,22 +2760,6 @@ object functions {
*/
def size(e: Column): Column = withExpr { Size(e.expr) }

/**
* Returns the key array of the map.
*
* @group collection_funcs
* @since 2.1.0
*/
def map_keys(e: Column): Column = withExpr { MapKeys(e.expr) }

/**
* Returns the key array of the map.
*
* @group collection_funcs
* @since 2.1.0
*/
def map_values(e: Column): Column = withExpr { MapValues(e.expr) }

/**
* Sorts the input array for the given column in ascending order,
* according to the natural ordering of the array elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,18 +358,10 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext {
(Map[Int, Int](), "y"),
(Map[Int, Int](1 -> 100, 2 -> 200, 3 -> 300), "z")
).toDF("a", "b")
checkAnswer(
df.select(map_keys($"a")),
Seq(Row(Seq(1, 2)), Row(Seq.empty), Row(Seq(1, 2, 3)))
)
checkAnswer(
df.selectExpr("map_keys(a)"),
Seq(Row(Seq(1, 2)), Row(Seq.empty), Row(Seq(1, 2, 3)))
)
checkAnswer(
df.select(map_values($"a")),
Seq(Row(Seq(100, 200)), Row(Seq.empty), Row(Seq(100, 200, 300)))
)
checkAnswer(
df.selectExpr("map_values(a)"),
Seq(Row(Seq(100, 200)), Row(Seq.empty), Row(Seq(100, 200, 300)))
Expand Down