-
Notifications
You must be signed in to change notification settings - Fork 166
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
doc: Add Plan Stability Testing to development guide #432
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,32 @@ mvn test -Dsuites="org.apache.comet.CometCastSuite valid" -Dskip.surefire.tests= | |
|
||
Other options for selecting specific suites are described in the [ScalaTest Maven Plugin documentation](https://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin) | ||
|
||
## Plan Stability Testing | ||
|
||
Comet has a plan stability testing framework that can be used to test the stability of the query plans generated by Comet. | ||
The plan stability testing framework is located in the `spark` module and can be run using the following command: | ||
|
||
``` | ||
mvn -pl spark -Dsuites="org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" test | ||
``` | ||
|
||
and | ||
``` | ||
mvn -pl spark -Dsuites="org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" test | ||
``` | ||
|
||
If your pull request changes the query plans generated by Comet, you should run the plan stability tests to regenerate the golden files. | ||
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. nit: I guess we can remove 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. Should we have a CI check that runs the plan stability tests to generate the golden files and then fail the build if the generated files cause a local diff? 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. Actually, never mind. We don't need this because the build would fail anyway if the golden files do not match the output from the test. 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.
Okay. |
||
To regenerate the golden files, you can run the following command: | ||
|
||
``` | ||
SPARK_GENERATE_GOLDEN_FILES=1 mvn -pl spark -Dsuites="org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" test | ||
``` | ||
|
||
and | ||
``` | ||
SPARK_GENERATE_GOLDEN_FILES=1 mvn -pl spark -Dsuites="org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" test | ||
``` | ||
|
||
## Benchmark | ||
|
||
There's a `make` command to run micro benchmarks in the repo. For | ||
|
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.
I think we should recommend to use
./mvnw
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.
Okay