Skip to content

Commit

Permalink
Simplify filter
Browse files Browse the repository at this point in the history
  • Loading branch information
petermaxlee committed Aug 10, 2016
1 parent 26c7771 commit 7497742
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class SQLQueryTestSuite extends QueryTest with SharedSQLContext {
// val cleaned = input.split("\n").filterNot(_.matches("--.*(?<=[^\\\\]);")).mkString("\n")
val cleaned = input.split("\n").filterNot(_.startsWith("--")).mkString("\n")
// note: this is not a robust way to split queries using semicolon, but works for now.
cleaned.split("(?<=[^\\\\]);").map(_.trim).filterNot(q => q == "").toSeq
cleaned.split("(?<=[^\\\\]);").map(_.trim).filter(_ != "").toSeq
}

// Run the SQL queries preparing them for comparison.
Expand Down

0 comments on commit 7497742

Please sign in to comment.