-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10176][SQL] Show partially analyzed plans when checkAnswer fails to analyze #8584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
61708d8 to
41a5f90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the ctx alias for sqlContext, and changed a lot of lines of code which is trival actually. It's not a big deal to keep an alias, so if you think it's unnecessary, I'll roll back it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. Since we often deal with both spark and sql contexts, I'd like to uniformly use sqlContext throughout the codebase.
|
Test build #41970 has finished for PR 8584 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't access SQLTestUtils in this file, not sure why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah weird, I tried it locally too and I can't even import it, we can just leave it then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQLTestUtils is in test scope. TestHive is in main.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK we can just leave it then. (why is TestHive in main??)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used by the hive console (build/sbt -Phive hive/console).
41a5f90 to
a9ae3f5
Compare
|
retest this please. |
|
cc @andrewor14 |
|
Test build #41973 has finished for PR 8584 at commit
|
a9ae3f5 to
0faa5ba
Compare
|
There is compilation error in InMemoryColumnarQuerySuite. Also, why this PR has significantly more changes than the original one? |
|
I think it's cause it renames |
|
Test build #41975 has finished for PR 8584 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: these could just be sparkContext I think. You can do a grep to find these.
|
Looks great. There are many places where we still do |
0faa5ba to
6db29b5
Compare
|
Test build #41988 has finished for PR 8584 at commit
|
|
OK LGTM I'm merging this into master thanks @marmbrus @cloud-fan |
|
@andrewor14 have you merged it? |
Jenkins master builders are currently broken by a merge conflict between PR #8584 and PR #8155. Author: Cheng Lian <[email protected]> Closes #8614 from liancheng/hotfix/fix-pr-8155-8584-conflict.
This PR takes over #8389.
This PR improves
checkAnswerto 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,ctxorhiveContextwith access modifierspublic,protectedandprivatedepending on the defining class.I propose we refactor as follows:
protected sqlContextwhen testing general features, andprotected hiveContextwhen it is a method that only exists on aHiveContext.testImplicits._(i.e., don't importTestHive.implicits._)