diff options
author | Reynold Xin <rxin@databricks.com> | 2015-01-29 15:13:09 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-01-29 15:13:09 -0800 |
commit | 715632232d0e6c97e304686608385d3b54a4bcf6 (patch) | |
tree | 747dac8cd85ec89d40537b980346d4d53bd69d93 /python/pyspark/sql.py | |
parent | f9e569452e2f0ae69037644170d8aa79ac6b4ccf (diff) | |
download | spark-715632232d0e6c97e304686608385d3b54a4bcf6.tar.gz spark-715632232d0e6c97e304686608385d3b54a4bcf6.tar.bz2 spark-715632232d0e6c97e304686608385d3b54a4bcf6.zip |
[SPARK-5445][SQL] Consolidate Java and Scala DSL static methods.
Turns out Scala does generate static methods for ones defined in a companion object. Finally no need to separate api.java.dsl and api.scala.dsl.
Author: Reynold Xin <rxin@databricks.com>
Closes #4276 from rxin/dsl and squashes the following commits:
30aa611 [Reynold Xin] Add all files.
1a9d215 [Reynold Xin] [SPARK-5445][SQL] Consolidate Java and Scala DSL static methods.
Diffstat (limited to 'python/pyspark/sql.py')
-rw-r--r-- | python/pyspark/sql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pyspark/sql.py b/python/pyspark/sql.py index fdd8034c98..e636f992ec 100644 --- a/python/pyspark/sql.py +++ b/python/pyspark/sql.py @@ -2342,7 +2342,7 @@ SCALA_METHOD_MAPPINGS = { def _create_column_from_literal(literal): sc = SparkContext._active_spark_context - return sc._jvm.org.apache.spark.sql.api.java.dsl.lit(literal) + return sc._jvm.org.apache.spark.sql.Dsl.lit(literal) def _create_column_from_name(name): @@ -2515,7 +2515,7 @@ def _aggregate_func(name): jcol = col._jc else: jcol = _create_column_from_name(col) - jc = getattr(sc._jvm.org.apache.spark.sql.api.java.dsl, name)(jcol) + jc = getattr(sc._jvm.org.apache.spark.sql.Dsl, name)(jcol) return Column(jc) return staticmethod(_) |