Skip to content

[GLUTEN-11550][VL] Fix GlutenWholeStageCodegenSuite in Spark 4.x#12507

Merged
zml1206 merged 2 commits into
apache:mainfrom
zml1206:GlutenWholeStageCodegenSuite
Jul 15, 2026
Merged

[GLUTEN-11550][VL] Fix GlutenWholeStageCodegenSuite in Spark 4.x#12507
zml1206 merged 2 commits into
apache:mainfrom
zml1206:GlutenWholeStageCodegenSuite

Conversation

@zml1206

@zml1206 zml1206 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Related issue: #11550

Copilot AI review requested due to automatic review settings July 14, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR aims to make GlutenWholeStageCodegenSuite work on Spark 4.x by replacing Spark’s row-based WholeStageCodegen plan assertions with Gluten-aware WholeStageTransformer/native transformer assertions, and then enabling the suite in Velox backend settings.

Changes:

  • Expanded GlutenWholeStageCodegenSuite (Spark 4.0 / 4.1) from an empty subclass into a full set of Gluten-aware test cases + helper assertions.
  • Enabled GlutenWholeStageCodegenSuite in Velox test settings (Spark 4.0 / 4.1) with targeted excludes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
gluten-ut/spark41/src/test/scala/org/apache/spark/sql/execution/GlutenWholeStageCodegenSuite.scala Replaces empty suite with Gluten-aware WholeStage/native operator assertions and reintroduced test cases.
gluten-ut/spark41/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala Enables the suite for Velox backend and configures exclusions.
gluten-ut/spark40/src/test/scala/org/apache/spark/sql/execution/GlutenWholeStageCodegenSuite.scala Same as Spark 4.1 version: adds Gluten-aware test implementations and helpers.
gluten-ut/spark40/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala Same as Spark 4.1 version: enables suite and configures exclusions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


import scala.reflect.ClassTag

class GlutenWholeStageCodegenSuite extends WholeStageCodegenSuite with GlutenSQLTestsTrait {
}
}

testGluten("range/filter should be combined") {
checkAnswer(df, Row(2))
}

testGluten("HashAggregate should be included in WholeStageCodegen") {

import scala.reflect.ClassTag

class GlutenWholeStageCodegenSuite extends WholeStageCodegenSuite with GlutenSQLTestsTrait {
}
}

testGluten("range/filter should be combined") {
checkAnswer(df, Row(2))
}

testGluten("HashAggregate should be included in WholeStageCodegen") {
Comment on lines +743 to +747
enableSuite[GlutenWholeStageCodegenSuite]
// Rewrite with Gluten-aware native whole-stage plan assertions.
.exclude("range/filter should be combined")
.exclude("HashAggregate should be included in WholeStageCodegen")
.exclude("SortAggregate should be included in WholeStageCodegen")
Comment on lines +764 to +768
enableSuite[GlutenWholeStageCodegenSuite]
// Rewrite with Gluten-aware native whole-stage plan assertions.
.exclude("range/filter should be combined")
.exclude("HashAggregate should be included in WholeStageCodegen")
.exclude("SortAggregate should be included in WholeStageCodegen")
@github-actions github-actions Bot added the CORE works for Gluten Core label Jul 14, 2026
@zml1206 zml1206 requested review from philo-he and zhouyuan July 14, 2026 12:49
Copilot AI review requested due to automatic review settings July 15, 2026 03:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@zhouyuan

Copy link
Copy Markdown
Member

@zml1206 thanks for working on this, we use to maintain the tests status for Spark-4.1 in this git issue: #11400
could you please help to update on this issue?
Also please add a prefix [GLUTEN-11400] in the PR title

@zml1206 zml1206 changed the title [VL] Fix GlutenWholeStageCodegenSuite in Spark 4.x [GLUTEN-11400][VL] Fix GlutenWholeStageCodegenSuite in Spark 4.x Jul 15, 2026
@zml1206 zml1206 changed the title [GLUTEN-11400][VL] Fix GlutenWholeStageCodegenSuite in Spark 4.x [GLUTEN-11550][VL] Fix GlutenWholeStageCodegenSuite in Spark 4.x Jul 15, 2026
@zml1206 zml1206 merged commit 010ba43 into apache:main Jul 15, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants