Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jul 13, 2016

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 (most recent call last):
    File "<stdin>", line 1, in <module>
    NameError: name 'sql' is not defined

After

  • Python

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

How was this patch tested?

Manual.

@dongjoon-hyun
Copy link
Member Author

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

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

SparkQA commented Jul 14, 2016

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
Copy link
Contributor

rxin commented Jul 14, 2016

Merging in master.

@asfgit asfgit closed this in 9c53057 Jul 14, 2016
@dongjoon-hyun
Copy link
Member Author

Thank you, @rxin !

@dongjoon-hyun dongjoon-hyun deleted the SPARK-16536 branch July 20, 2016 07:45
Sign up for free to 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