dongjoon-hyun opened a new pull request, #60080:
URL: https://github.com/apache/spark/pull/60080

   ### What changes were proposed in this pull request?
   
   This PR removes the unused `Aggregate` import from `DataFrameAggregateSuite` 
to fix the compilation error on `branch-4.3`.
   
   ```scala
   -import org.apache.spark.sql.catalyst.plans.logical.{Aggregate, Expand}
   +import org.apache.spark.sql.catalyst.plans.logical.Expand
   ```
   
   ### Why are the changes needed?
   
   `branch-4.3` fails to compile since af442baaa05, the `branch-4.3` backport 
of #59507 (SPARK-60240). The backport changed this import to the `master` 
version, `{Aggregate, Expand}`. On `master`, #59403 (SPARK-60150) added 
`Aggregate` to this import and uses it in a test, but `branch-4.3` does not 
have SPARK-60150. Since an unused import is a compilation error 
(`-Wunused:imports` with `-Wconf:any:e`), `sql / Test` fails to compile. The 
latest commit, 37ea7eff43a, fails with the same error.
   
   - https://github.com/apache/spark/actions/runs/41530389382
   - https://github.com/apache/spark/actions/runs/41746113148
   
   ```
   [error] 
/home/runner/work/spark/spark/sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala:36:53:
 Unused import
   [error] Applicable -Wconf / @nowarn filters for this fatal warning: 
msg=<part of the message>, cat=unused-imports, site=org.apache.spark.sql
   [error] import org.apache.spark.sql.catalyst.plans.logical.{Aggregate, 
Expand}
   [error]                                                     ^
   [error] one error found
   [error] (sql / Test / compileIncremental) Compilation failed
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This is a test-only change.
   
   ### How was this patch tested?
   
   Pass the CIs. In addition, I compiled all main and test sources with JDK 17 
and the same profiles as the CI `Precompile Spark` job. Because of this 
compilation error, the CI has not run the tests of af442baaa05 on `branch-4.3` 
yet, so I also ran the related test suites manually.
   
   ```
   $ build/sbt -Phadoop-3 -Pyarn -Pspark-ganglia-lgpl -Phadoop-cloud -Phive \
     -Pkubernetes -Pjvm-profiler -Pkinesis-asl -Phive-thriftserver \
     -Pdocker-integration-tests -Pkubernetes-integration-tests -Pvolcano \
     Test/compile
   ...
   [success] Total time: 77 s (0:01:17.0), completed Nov 3, 2026, 9:13:43 PM
   ```
   
   ```
   $ build/sbt 'sql/testOnly org.apache.spark.sql.DataFrameAggregateSuite'
   ...
   [info] - SPARK-60240: tuple_sketch_agg_double with 
spark.sql.execution.bypassPartialAggregation returns the trimmed sketch of 
Partial + Final mode [lg=5] (62 milliseconds)
   ...
   [info] - SPARK-60240: tuple_sketch_agg_integer window equals GROUP BY 
[estimation] mode=alwaysone (97 milliseconds)
   ...
   [info] Tests: succeeded 207, failed 0, canceled 0, ignored 0, pending 0
   [info] All tests passed.
   ```
   
   ```
   $ build/sbt 'catalyst/testOnly *TupleSketchAggSuite *TupleSketchUtilsSuite'
   ...
   [info] Tests: succeeded 57, failed 0, canceled 0, ignored 0, pending 0
   [info] All tests passed.
   ```
   
   ```
   $ build/sbt 'sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z 
tuplesketch.sql'
   ...
   [info] - tuplesketch.sql (11 seconds, 331 milliseconds)
   [info] - tuplesketch.sql_analyzer_test (1 second, 587 milliseconds)
   ...
   [info] Tests: succeeded 2, failed 0, canceled 0, ignored 0, pending 0
   [info] All tests passed.
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to