Skip to content

Commit bcc646b

Browse files
committed
[SPARK-39442][SQL][TESTS] Update PlanStabilitySuite comments with SPARK_ANSI_SQL_MODE
### What changes were proposed in this pull request? This PR aims to update `PlanStabilitySuite` direction to prevent future mistakes. 1. Add `SPARK_ANSI_SQL_MODE=true` explicitly because Apache Spark 3.3+ test coverage has ANSI and non-ANSI modes. We need to make it sure that both results are synced at the same time. ``` - SPARK_GENERATE_GOLDEN_FILES=1 build/sbt ... + SPARK_GENERATE_GOLDEN_FILES=1 build/sbt ... + SPARK_GENERATE_GOLDEN_FILES=1 SPARK_ANSI_SQL_MODE=true ... ``` 2. The existing commands are human-readable but is not working. So, we had better have more simple command which is *copy-and-pasteable*. ``` - build/sbt "sql/testOnly *PlanStability[WithStats]Suite" + build/sbt "sql/testOnly *PlanStability*Suite" ``` ### Why are the changes needed? This will help us update the test results more easily by preventing mistakes. ### Does this PR introduce _any_ user-facing change? No. This is a dev-only doc. ### How was this patch tested? Manual review. Closes #36839 from dongjoon-hyun/SPARK-39442. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit d426c10) Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent aba523c commit bcc646b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,24 @@ import org.apache.spark.tags.ExtendedSQLTest
4848
*
4949
* To run the entire test suite:
5050
* {{{
51-
* build/sbt "sql/testOnly *PlanStability[WithStats]Suite"
51+
* build/sbt "sql/testOnly *PlanStability*Suite"
5252
* }}}
5353
*
5454
* To run a single test file upon change:
5555
* {{{
56-
* build/sbt "sql/testOnly *PlanStability[WithStats]Suite -- -z (tpcds-v1.4/q49)"
56+
* build/sbt "sql/testOnly *PlanStability*Suite -- -z (tpcds-v1.4/q49)"
5757
* }}}
5858
*
5959
* To re-generate golden files for entire suite, run:
6060
* {{{
61-
* SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly *PlanStability[WithStats]Suite"
61+
* SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly *PlanStability*Suite"
62+
* SPARK_GENERATE_GOLDEN_FILES=1 SPARK_ANSI_SQL_MODE=true build/sbt "sql/testOnly *PlanStability*Suite"
6263
* }}}
6364
*
6465
* To re-generate golden file for a single test, run:
6566
* {{{
66-
* SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly *PlanStability[WithStats]Suite -- -z (tpcds-v1.4/q49)"
67+
* SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly *PlanStability*Suite -- -z (tpcds-v1.4/q49)"
68+
* SPARK_GENERATE_GOLDEN_FILES=1 SPARK_ANSI_SQL_MODE=true build/sbt "sql/testOnly *PlanStability*Suite -- -z (tpcds-v1.4/q49)"
6769
* }}}
6870
*/
6971
// scalastyle:on line.size.limit

0 commit comments

Comments
 (0)