-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-16866][SQL] Infrastructure for file-based SQL end-to-end tests #14472
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
Changes from 1 commit
ba9b678
9b360da
a1e1b57
2352d6f
34b6704
0359756
5eb01fe
26c7771
7497742
14f4959
288b699
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you explain a bit more about this regex? Why can't we just use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied this from HiveComparisonTest. I think it is done to avoid escaping e.g. ";". It is really not very robust, but seems fine for now.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you explain a bit more about this regex? Why can't we just use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied this from HiveComparisonTest. I think it is done to avoid escaping e.g. ";". It is really not very robust, but seems fine for now. |
||
| } | ||
|
|
||
| // Run the SQL queries preparing them for comparison. | ||
|
|
||
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.
remove this line?
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.
done