[ 
https://issues.apache.org/jira/browse/SPARK-16536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376016#comment-15376016
 ] 

Apache Spark commented on SPARK-16536:
--------------------------------------

User 'dongjoon-hyun' has created a pull request for this issue:
https://github.com/apache/spark/pull/14190

> Expose `sql` in PySpark shell
> -----------------------------
>
>                 Key: SPARK-16536
>                 URL: https://issues.apache.org/jira/browse/SPARK-16536
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark, SQL
>            Reporter: Dongjoon Hyun
>            Priority: Minor
>
> This issue exposes `sql` in PySparkShell like Scala/R shells.
> **Background**
> {code}
> scala> sql("select 1 a")
> res0: org.apache.spark.sql.DataFrame = [a: int]
> {code}
> {code}
> > sql("select 1")
> SparkDataFrame[1:int]
> {code}
> **Before**
> {code}
> >>> sql("select 1 a")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> NameError: name 'sql' is not defined
> {code}
> **After**
> {code}
> >>> sql("select 1 a")
> DataFrame[a: int]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to