-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-6765] Fix test code style for SQL #5412
Conversation
Test build #29842 has started for PR 5412 at commit |
Test build #29842 has finished for PR 5412 at commit
|
Test FAILed. |
@@ -202,7 +204,7 @@ class AnalysisSuite extends FunSuite with BeforeAndAfter { | |||
|
|||
case class UnresolvedTestPlan() extends LeafNode { | |||
override lazy val resolved = false |
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.
Do we also want public fields have explicit type too?
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.
Yes - but there is no rule for it yet.
fail( | ||
s""" | ||
|== FAIL: Plans do not match === | ||
|${sideBySide(normalized1.treeString, normalized2.treeString).mkString("\n")} | ||
""".stripMargin) | ||
} |
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.
Indentation is off here.
Test build #29846 has started for PR 5412 at commit |
Test build #29846 has finished for PR 5412 at commit
|
Test FAILed. |
@@ -67,7 +67,7 @@ class QueryTest extends PlanTest { | |||
checkAnswer(df, Seq(expectedAnswer)) | |||
} | |||
|
|||
def sqlTest(sqlString: String, expectedAnswer: Seq[Row])(implicit sqlContext: SQLContext): Unit = { | |||
def sqlTest(sqlString: String, expectedAnswer: Seq[Row])(implicit sqlContext: SQLContext) { |
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.
Why removing return type of this one?
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 was too long - either wrap it, or just remove :Unit
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 believe this form of method is going to be deprecated.
Test build #29887 has started for PR 5412 at commit |
Test build #29888 has started for PR 5412 at commit |
Test build #29887 has finished for PR 5412 at commit
|
Test FAILed. |
Test build #29888 has finished for PR 5412 at commit
|
Test FAILed. |
Test build #29890 has started for PR 5412 at commit |
Test build #29890 has finished for PR 5412 at commit
|
Test FAILed. |
Test build #29904 has started for PR 5412 at commit |
Test build #29904 has finished for PR 5412 at commit
|
Test PASSed. |
For @rxin 's sanity I'll merge this now :) We can update the final minor comments in followups. |
Actually, apache git is down :( |
Ok I've merged it. |
Turn scalastyle on for all test code. Most of the violations have been resolved in my previous pull requests: Core: #5484 SQL: #5412 MLlib: #5411 GraphX: #5410 Streaming: #5409 Author: Reynold Xin <rxin@databricks.com> Closes #5486 from rxin/test-style-enable and squashes the following commits: 01683de [Reynold Xin] Fixed new code. a4ab46e [Reynold Xin] Fixed tests. 20adbc8 [Reynold Xin] Missed one violation. 5e36521 [Reynold Xin] [SPARK-6765] Enable scalastyle on test code.
So we can turn style checker on for test code.