GitHub user cloud-fan opened a pull request:

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

    [SPARK-10176][SQL] Show partially analyzed plans when checkAnswer fails to 
analyze

    This PR takes over https://github.com/apache/spark/pull/8389.
    
    This PR improves `checkAnswer` to print the partially analyzed plan in 
addition to the user friendly error message, in order to aid debugging failing 
tests.
    
    In doing so, I ran into a conflict with the various ways that we bring a 
SQLContext into the tests. Depending on the trait we refer to the current 
context as `sqlContext`, `_sqlContext`, `ctx` or `hiveContext` with access 
modifiers `public`, `protected` and `private` depending on the defining class.
    
    I propose we refactor as follows:
    
    1. All tests should only refer to a `protected sqlContext` when testing 
general features, and `protected hiveContext` when it is a method that only 
exists on a `HiveContext`.
    2. All tests should only import `testImplicits._` (i.e., don't import 
`TestHive.implicits._`)


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

    $ git pull https://github.com/cloud-fan/spark cleanupTests

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

    https://github.com/apache/spark/pull/8584.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 #8584
    
----
commit f1a21689dee5968fa72da84a897e137dd25629ab
Author: Wenchen Fan <cloud0...@outlook.com>
Date:   2015-09-03T14:02:31Z

    clean up sql tests

----


---
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