Skip to content

[SPARK-16536][SQL][PYSPARK][MINOR] Expose sql in PySpark Shell - #14190

Closed
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-16536
Closed

[SPARK-16536][SQL][PYSPARK][MINOR] Expose sql in PySpark Shell#14190
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-16536

Conversation

@dongjoon-hyun

@dongjoon-hyundongjoon-hyun commented Jul 13, 2016

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This PR exposes sql in PySpark Shell like Scala/R Shells for consistency.

Background

  • Scala

    scala> sql("select 1 a")
    res0: org.apache.spark.sql.DataFrame= [a: int]
  • R

    > sql("select 1")
    SparkDataFrame[1:int]

Before

  • Python

    >>>sql("select 1 a")
    Traceback (mostrecentcalllast):
    File"<stdin>", line1, in<module>NameError: name'sql'isnotdefined

After

  • Python

    >>>sql("select 1 a")
    DataFrame[a: int]

How was this patch tested?

Manual.

@dongjoon-hyun

Copy link
Copy Markdown
MemberAuthor

Hi, @rxin .
Could you review this trivial PR exposing sql() in PySpark Shell for consistency?

@dongjoon-hyundongjoon-hyun changed the title [SPARK-16536][SQL][PYSPARK] Expose sql in PySpark Shell[SPARK-16536][SQL][PYSPARK][MINOR] Expose sql in PySpark ShellJul 14, 2016
@SparkQA

Copy link
Copy Markdown

Test build #62286 has finished for PR 14190 at commit c5dc235.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin

rxin commented Jul 14, 2016

Copy link
Copy Markdown
Contributor

Merging in master.

@dongjoon-hyun

Copy link
Copy Markdown
MemberAuthor

Thank you, @rxin !

@dongjoon-hyun
dongjoon-hyun deleted the SPARK-16536 branch July 20, 2016 07:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dongjoon-hyun@SparkQA@rxin