diff options
author | Dongjoon Hyun <dongjoon@apache.org> | 2016-07-13 22:24:26 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-07-13 22:24:26 -0700 |
commit | 9c530576a44cbeb956db94e7fdd1fad50bd62973 (patch) | |
tree | 4c6746b0a14fa50810c6e2ad3fc3bf4418d0978f /python/lib | |
parent | a5f51e21627c1bcfc62829a3a962707abf41a452 (diff) | |
download | spark-9c530576a44cbeb956db94e7fdd1fad50bd62973.tar.gz spark-9c530576a44cbeb956db94e7fdd1fad50bd62973.tar.bz2 spark-9c530576a44cbeb956db94e7fdd1fad50bd62973.zip |
[SPARK-16536][SQL][PYSPARK][MINOR] Expose `sql` in PySpark Shell
## What changes were proposed in this pull request?
This PR exposes `sql` in PySpark Shell like Scala/R Shells for consistency.
**Background**
* Scala
```scala
scala> sql("select 1 a")
res0: org.apache.spark.sql.DataFrame = [a: int]
```
* R
```r
> sql("select 1")
SparkDataFrame[1:int]
```
**Before**
* Python
```python
>>> sql("select 1 a")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'sql' is not defined
```
**After**
* Python
```python
>>> sql("select 1 a")
DataFrame[a: int]
```
## How was this patch tested?
Manual.
Author: Dongjoon Hyun <dongjoon@apache.org>
Closes #14190 from dongjoon-hyun/SPARK-16536.
Diffstat (limited to 'python/lib')
0 files changed, 0 insertions, 0 deletions