diff options
author | Reynold Xin <rxin@databricks.com> | 2015-07-20 09:43:25 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-20 09:43:25 -0700 |
commit | c6fe9b4a179eecce69a813501dd0f4a22ff5dd5b (patch) | |
tree | 413b05f677e0c2535b245dd83e97fa738f15ced0 /sql | |
parent | 04db58ae30d2f73af45b7e6813f97be62dc92095 (diff) | |
download | spark-c6fe9b4a179eecce69a813501dd0f4a22ff5dd5b.tar.gz spark-c6fe9b4a179eecce69a813501dd0f4a22ff5dd5b.tar.bz2 spark-c6fe9b4a179eecce69a813501dd0f4a22ff5dd5b.zip |
[SQL] Remove space from DataFrame Scala/Java API.
I don't think this function is useful at all in Scala/Java, since users can easily compute n * space easily.
Author: Reynold Xin <rxin@databricks.com>
Closes #7530 from rxin/remove-space and squashes the following commits:
c147873 [Reynold Xin] [SQL] Remove space from DataFrame Scala/Java API.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 20 | ||||
-rw-r--r-- | sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala | 4 |
2 files changed, 0 insertions, 24 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala index b5140dca04..41b25d1836 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala @@ -2237,26 +2237,6 @@ object functions { StringReverse(str.expr) } - /** - * Make a n spaces of string. - * - * @group string_funcs - * @since 1.5.0 - */ - def space(n: String): Column = { - space(Column(n)) - } - - /** - * Make a n spaces of string. - * - * @group string_funcs - * @since 1.5.0 - */ - def space(n: Column): Column = { - StringSpace(n.expr) - } - ////////////////////////////////////////////////////////////////////////////////////////////// // DateTime functions ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala index fe4de8d8b8..413f3858d6 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala @@ -191,10 +191,6 @@ class StringFunctionsSuite extends QueryTest { val df = Seq((2, 3)).toDF("a", "b") checkAnswer( - df.select(space($"a"), space("b")), - Row(" ", " ")) - - checkAnswer( df.selectExpr("space(b)"), Row(" ")) } |