aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorDongjoon Hyun <dongjoon@apache.org>2016-03-10 15:57:22 -0800
committerAndrew Or <andrew@databricks.com>2016-03-10 15:57:22 -0800
commit91fed8e9c57764eca9463d129ecd68196db7f566 (patch)
treeb06c678dc15258af92116019760e6b9c98d81c2d /sql/hive
parent81d48532d954a8aea28d7e1fb3aa32a78c708b63 (diff)
downloadspark-91fed8e9c57764eca9463d129ecd68196db7f566.tar.gz
spark-91fed8e9c57764eca9463d129ecd68196db7f566.tar.bz2
spark-91fed8e9c57764eca9463d129ecd68196db7f566.zip
[SPARK-3854][BUILD] Scala style: require spaces before `{`.
## What changes were proposed in this pull request? Since the opening curly brace, '{', has many usages as discussed in [SPARK-3854](https://issues.apache.org/jira/browse/SPARK-3854), this PR adds a ScalaStyle rule to prevent '){' pattern for the following majority pattern and fixes the code accordingly. If we enforce this in ScalaStyle from now, it will improve the Scala code quality and reduce review time. ``` // Correct: if (true) { println("Wow!") } // Incorrect: if (true){ println("Wow!") } ``` IntelliJ also shows new warnings based on this. ## How was this patch tested? Pass the Jenkins ScalaStyle test. Author: Dongjoon Hyun <dongjoon@apache.org> Closes #11637 from dongjoon-hyun/SPARK-3854.
Diffstat (limited to 'sql/hive')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/client/FiltersSuite.scala2
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/FiltersSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/FiltersSuite.scala
index 5e7b93d457..16b2d042a2 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/FiltersSuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/FiltersSuite.scala
@@ -65,7 +65,7 @@ class FiltersSuite extends SparkFunSuite with Logging {
"")
private def filterTest(name: String, filters: Seq[Expression], result: String) = {
- test(name){
+ test(name) {
val converted = shim.convertFilters(testTable, filters)
if (converted != result) {
fail(
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala
index 703cfffee1..d7c529ab0e 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala
@@ -361,7 +361,7 @@ class HiveUDFSuite extends QueryTest with TestHiveSingleton with SQLTestUtils {
}
}
- test("SPARK-11522 select input_file_name from non-parquet table"){
+ test("SPARK-11522 select input_file_name from non-parquet table") {
withTempDir { tempDir =>