diff options
author | Davies Liu <davies@databricks.com> | 2015-02-04 11:34:46 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-02-04 11:34:46 -0800 |
commit | ac0b2b788ff144970d6fdbdc445367772770458d (patch) | |
tree | 65a7875644f6ef8617c6e53e413fbce321cbb33e /sql/core | |
parent | 38a416f0360fa68fc445af14910fb253ff9ad493 (diff) | |
download | spark-ac0b2b788ff144970d6fdbdc445367772770458d.tar.gz spark-ac0b2b788ff144970d6fdbdc445367772770458d.tar.bz2 spark-ac0b2b788ff144970d6fdbdc445367772770458d.zip |
[SPARK-5588] [SQL] support select/filter by SQL expression
```
df.selectExpr('a + 1', 'abs(age)')
df.filter('age > 3')
df[ df.age > 3 ]
df[ ['age', 'name'] ]
```
Author: Davies Liu <davies@databricks.com>
Closes #4359 from davies/select_expr and squashes the following commits:
d99856b [Davies Liu] support select/filter by SQL expression
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala b/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala index 8cf59f0a1f..50f442dd87 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/Dsl.scala @@ -17,11 +17,8 @@ package org.apache.spark.sql -import java.util.{List => JList} - import scala.language.implicitConversions import scala.reflect.runtime.universe.{TypeTag, typeTag} -import scala.collection.JavaConversions._ import org.apache.spark.sql.catalyst.ScalaReflection import org.apache.spark.sql.catalyst.expressions._ @@ -169,14 +166,6 @@ object Dsl { /** Computes the absolutle value. */ def abs(e: Column): Column = Abs(e.expr) - /** - * This is a private API for Python - * TODO: move this to a private package - */ - def toColumns(cols: JList[Column]): Seq[Column] = { - cols.toList.toSeq - } - ////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////// |