@@ -92,32 +92,49 @@ Other options for selecting specific suites are described in the [ScalaTest Mave
9292## Plan Stability Testing
9393
9494Comet has a plan stability testing framework that can be used to test the stability of the query plans generated by Comet.
95- The plan stability testing framework is located in the ` spark ` module and can be run using the following command:
95+ The plan stability testing framework is located in the ` spark ` module and can be run using the following commands.
96+
97+ First, Comet needs to be installed for each Spark version to be tested:
98+
99+ ``` sh
100+ ./mvnw install -DskipTests -Pspark-3.4
101+ ./mvnw install -DskipTests -Pspark-3.5
102+ # note that Spark 4.0 requires JDK 17 or later
103+ ./mvnw install -DskipTests -Pspark-4.0
104+ ```
105+
106+ Note that the output files get written to ` $SPARK_HOME ` .
107+
108+ The tests can be run with:
96109
97110``` sh
111+ export SPARK_HOME=` pwd`
98112./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" -nsu test
99113./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" -Pspark-3.5 -nsu test
100114./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" -Pspark-4.0 -nsu test
101115```
102116
103117and
104118``` sh
119+ export SPARK_HOME=` pwd`
105120./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" -nsu test
106121./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" -Pspark-3.5 -nsu test
107122./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" -Pspark-4.0 -nsu test
108123```
109124
110125If your pull request changes the query plans generated by Comet, you should regenerate the golden files.
111- To regenerate the golden files, you can run the following command:
126+ To regenerate the golden files, you can run the following commands.
112127
113128``` sh
129+ export SPARK_HOME=` pwd`
114130SPARK_GENERATE_GOLDEN_FILES=1 ./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" -nsu test
115131SPARK_GENERATE_GOLDEN_FILES=1 ./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" -Pspark-3.5 -nsu test
116132SPARK_GENERATE_GOLDEN_FILES=1 ./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV1_4_PlanStabilitySuite" -Pspark-4.0 -nsu test
117133```
118134
119135and
120136``` sh
137+ export SPARK_HOME=` pwd`
121138SPARK_GENERATE_GOLDEN_FILES=1 ./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" -nsu test
122139SPARK_GENERATE_GOLDEN_FILES=1 ./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" -Pspark-3.5 -nsu test
123140SPARK_GENERATE_GOLDEN_FILES=1 ./mvnw -pl spark -Dsuites=" org.apache.spark.sql.comet.CometTPCDSV2_7_PlanStabilitySuite" -Pspark-4.0 -nsu test
0 commit comments