-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-42874][SQL] Enable new golden file test framework for analysis for all input files #40496
Conversation
merge from base branch
LGTM if tests pass |
sql/core/src/test/resources/sql-tests/analyzer-results/ansi/cast.sql.out
Outdated
Show resolved
Hide resolved
commit commit commit commit commit commit commit commit commit
faa3485
to
5d987f4
Compare
LGTM |
@HyukjinKwon the tests are passing now, this is ready to merge if you are ready :) |
@dtenedor Wait a few minutes for me to check with Scala 2.13 manually |
done, should be ok ~ |
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.
LGTM
Merged to master. |
I think ANSI test fails after this PR:
https://github.com/apache/spark/actions/runs/4496107425/jobs/7910457741 @dtenedor mind taking a look please? cc @gengliangwang |
Sure, I can take a look.
…On Fri, Mar 24, 2023 at 3:12 AM Hyukjin Kwon ***@***.***> wrote:
I think ANSI test fails after this PR:
[info] - timestampNTZ/datetime-special.sql_analyzer_test *** FAILED *** (31 milliseconds)
[info] timestampNTZ/datetime-special.sql_analyzer_test
[info] Expected "...date(999999, 3, 18, [false) AS make_date(999999, 3, 18)#x, make_date(-1, 1, 28, fals]e) AS make_date(-1, ...", but got "...date(999999, 3, 18, [true) AS make_date(999999, 3, 18)#x, make_date(-1, 1, 28, tru]e) AS make_date(-1, ..." Result did not match for query #1
[info] select make_date(999999, 3, 18), make_date(-1, 1, 28) (SQLQueryTestSuite.scala:777)
[info] org.scalatest.exceptions.TestFailedException:
[info] at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
[info] at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)
[info] at org.scalatest.funsuite.AnyFunSuite.newAssertionFailedException(AnyFunSuite.scala:1564)
[info] at org.scalatest.Assertions.assertResult(Assertions.scala:847)
[info] at org.scalatest.Assertions.assertResult$(Assertions.scala:842)
[info] at org.scalatest.funsuite.AnyFunSuite.assertResult(AnyFunSuite.scala:1564)
[info] at org.apache.spark.sql.SQLQueryTestSuite.$anonfun$readGoldenFileAndCompareResults$3(SQLQueryTestSuite.scala:777)
[info] at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
https://github.com/apache/spark/actions/runs/4496107425/jobs/7910457741
@dtenedor <https://github.com/dtenedor> mind taking a look please? cc
@gengliangwang <https://github.com/gengliangwang>
—
Reply to this email directly, view it on GitHub
<#40496 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXU4PODW66JIEV5CNJWXEALW5VXQJANCNFSM6AAAAAAWBOMAJQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Please write anonymous feedback for Daniel at any time (form
<https://docs.google.com/forms/d/e/1FAIpQLSc-Nd9JOncZTMb2hlhj9GxQO0igStEBgtFclLXFsQleamA0ag/viewform?vc=0&c=0&w=1&flr=0>
).
|
@HyukjinKwon I ran the test locally and it passes. Maybe it is fixed at head now? |
Seems not fixed, run
can reproduce the failure |
Looks like @LuciferYang fixed it with #40552. Thanks so much for the fix! |
…nto w/ and w/o `ansi` suffix to pass sql analyzer test in ansi mode ### What changes were proposed in this pull request? After #40496, run ``` SPARK_ANSI_SQL_MODE=true build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite" ``` There is one test faild with `spark.sql.ansi.enabled = true` ``` [info] - timestampNTZ/datetime-special.sql_analyzer_test *** FAILED *** (11 milliseconds) [info] timestampNTZ/datetime-special.sql_analyzer_test [info] Expected "...date(999999, 3, 18, [false) AS make_date(999999, 3, 18)#x, make_date(-1, 1, 28, fals]e) AS make_date(-1, ...", but got "...date(999999, 3, 18, [true) AS make_date(999999, 3, 18)#x, make_date(-1, 1, 28, tru]e) AS make_date(-1, ..." Result did not match for query #1 [info] select make_date(999999, 3, 18), make_date(-1, 1, 28) (SQLQueryTestSuite.scala:777) [info] org.scalatest.exceptions.TestFailedException: ``` The failure reason is the last parameter of function `MakeDate` is `failOnError: Boolean = SQLConf.get.ansiEnabled`. So this pr split `timestampNTZ/datetime-special.sql` into w/ and w/o ansi to mask this test difference. ### Why are the changes needed? Make SQLQueryTestSuite test pass with `spark.sql.ansi.enabled = true`. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Pass GitHub Actions - Manual checked `SPARK_ANSI_SQL_MODE=true build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"` Closes #40552 from LuciferYang/SPARK-42921. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
What changes were proposed in this pull request?
This PR enables the new golden file test framework for analysis for all input files.
Background:
sql/core/src/test/resources/sql-tests/inputs
directory, writing separate output test files in the newsql/core/src/test/resources/sql-tests/analyzer-results
directory in additional to the original output directory for full end-to-end query execution results.Why are the changes needed?
This improves test coverage and helps prevent against accidental regressions in the future as we edit the code.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
This PR adds testing only.