Skip to content

Commit 7497742

Browse files
committed
Simplify filter
1 parent 26c7771 commit 7497742

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class SQLQueryTestSuite extends QueryTest with SharedSQLContext {
124124
// val cleaned = input.split("\n").filterNot(_.matches("--.*(?<=[^\\\\]);")).mkString("\n")
125125
val cleaned = input.split("\n").filterNot(_.startsWith("--")).mkString("\n")
126126
// note: this is not a robust way to split queries using semicolon, but works for now.
127-
cleaned.split("(?<=[^\\\\]);").map(_.trim).filterNot(q => q == "").toSeq
127+
cleaned.split("(?<=[^\\\\]);").map(_.trim).filter(_ != "").toSeq
128128
}
129129

130130
// Run the SQL queries preparing them for comparison.

0 commit comments

Comments
 (0)