GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/14435

    [SPARK-16756][SQL][WIP] Add `sql` function to LogicalPlan and `NonSQLPlan` 
trait

    ## What changes were proposed in this pull request?
    This PR is a part of 
[SPARK-16576](https://issues.apache.org/jira/browse/SPARK-16576) that moves 
logicalPlan SQL generation code from SQLBuilder into logical operators.
    
    Like `Expression`, this PR adds `sql` function for `LogicalPlan` and 
`NonSQLPlan` trait. The method will be `abstract` method. All logical plan 
should implement that or use trait `NonSQLPlan` explicitly.
    
    ```scala
    /**
     * Returns SQL representation of this plan. For the plans extending 
[[NonSQLPlan]],
     * this method may return an arbitrary user facing string.
     */
    def sql: String
    ```
    
    This PR updates testsuites including`LogicalPlanToSQLSuite` and 
`ExpressionToSQLSuite` in order to test new `sql` function, but does not remove 
`SQLBuilder` and its usage in `views.scala` of `sql/core`.
    
    ## How was this patch tested?
    
    Pass the Jenkins tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-16756

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14435.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14435
    
----
commit 1392c8a62e57c0a9b66555d4ac676eb0269533a3
Author: Dongjoon Hyun <dongj...@apache.org>
Date:   2016-08-01T07:00:11Z

    [SPARK-16756][SQL] Add `sql` function to LogicalPlan and `NonSQLPlan` trait

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to