diff options
author | Davies Liu <davies@databricks.com> | 2015-04-08 13:31:45 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-04-08 13:31:45 -0700 |
commit | 6ada4f6f52cf1d992c7ab0c32318790cf08b0a0d (patch) | |
tree | 495c9bb86bb98de40365538bebcf9144547d8cce /python/pyspark/sql/functions.py | |
parent | 66159c35010af35098dd1ec75475bb5d4d0fd6ca (diff) | |
download | spark-6ada4f6f52cf1d992c7ab0c32318790cf08b0a0d.tar.gz spark-6ada4f6f52cf1d992c7ab0c32318790cf08b0a0d.tar.bz2 spark-6ada4f6f52cf1d992c7ab0c32318790cf08b0a0d.zip |
[SPARK-6781] [SQL] use sqlContext in python shell
Use `sqlContext` in PySpark shell, make it consistent with SQL programming guide. `sqlCtx` is also kept for compatibility.
Author: Davies Liu <davies@databricks.com>
Closes #5425 from davies/sqlCtx and squashes the following commits:
af67340 [Davies Liu] sqlCtx -> sqlContext
15a278f [Davies Liu] use sqlContext in python shell
Diffstat (limited to 'python/pyspark/sql/functions.py')
-rw-r--r-- | python/pyspark/sql/functions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 146ba6f3e0..daeb6916b5 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -161,7 +161,7 @@ def _test(): globs = pyspark.sql.functions.__dict__.copy() sc = SparkContext('local[4]', 'PythonTest') globs['sc'] = sc - globs['sqlCtx'] = SQLContext(sc) + globs['sqlContext'] = SQLContext(sc) globs['df'] = sc.parallelize([Row(name='Alice', age=2), Row(name='Bob', age=5)]).toDF() (failure_count, test_count) = doctest.testmod( pyspark.sql.functions, globs=globs, |