GitHub user marmbrus opened a pull request:

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

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

    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:
     - 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`.
     - All tests should only import `testImplicits._`.
    
    I made a pretty good crack at implementing the above, though there may be 
other outstanding locations.  I suggest we address these in a follow up due to 
the likely hood of conflicts.

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

    $ git pull https://github.com/marmbrus/spark cleanupTests

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

    https://github.com/apache/spark/pull/8389.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 #8389
    
----
commit 9b58dd71930ab21b16fc60d7aa60c29e8566b4e6
Author: Michael Armbrust <mich...@databricks.com>
Date:   2015-08-24T01:48:45Z

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

commit 4b6a6f4d16f6b0097f38f72cd1310849c14902ff
Author: Michael Armbrust <mich...@databricks.com>
Date:   2015-08-24T02:03:33Z

    Merge remote-tracking branch 'origin/master' into cleanupTests
    
    Conflicts:
        
sql/hive/src/test/scala/org/apache/spark/sql/hive/MultiDatabaseSuite.scala

commit f3b5d3a5b24c9bfc1d8799ef6bc8ee9516c0a21a
Author: Michael Armbrust <mich...@databricks.com>
Date:   2015-08-24T02:36:20Z

    more cleanup

----


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