Skip to content

Commit

Permalink
Remove from sql.functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Jul 2, 2016
1 parent c0dac4b commit 8db1e65
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
16 changes: 0 additions & 16 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
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
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

0 comments on commit 8db1e65

Please sign in to comment.