-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-21914][SQL][TESTS] Check results of expression examples #25942
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
5a80e69
1f52b75
d90a6ae
b0d2d4b
8abbd86
3dbb9cf
9834f04
c60bf69
201863c
6c158d8
3dd25a7
1216b02
4be0acd
4740c8d
3bc35f6
6e68f43
3f1e42c
c30195e
33665b7
2ca354e
4a328bb
dcd9816
41e4d7c
cee6709
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 |
|---|---|---|
|
|
@@ -174,18 +174,15 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession { | |
| if (!ignoreSet.contains(className)) { | ||
| withClue(s"Function '${info.getName}', Expression class '$className'") { | ||
| val example = info.getExamples | ||
| logTrace(example) | ||
| checkExampleSyntax(example) | ||
| example.split(" > ").toList.foreach(_ match { | ||
| case exampleRe(sql, output) => | ||
| val df = spark.sql(sql) | ||
| val actual = unindentAndTrim( | ||
| hiveResultString(df.queryExecution.executedPlan).mkString("\n")) | ||
|
Member
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. How about checking results with/without codegen?
Member
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. Purpose of this test is to check that output of examples is up to date, and matches to current output of |
||
| logTrace(s"Actual: $actual") | ||
| val expected = unindentAndTrim(output) | ||
| logTrace(s"Expected: $expected") | ||
| assert(actual === expected) | ||
| case notMatched => logTrace(notMatched) | ||
| case _ => | ||
| }) | ||
| } | ||
| } | ||
|
|
||
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.
nit
(_ match {can be removed.