Skip to content

[GLUTEN-11550][UT] Add GlutenTestSetWithSystemPropertyTrait, enable 6 suites, remove 7 TestHiveSingleton suites#11847

Draft
baibaichen wants to merge 2 commits intoapache:mainfrom
baibaichen:fix/11550-system-property-trait
Draft

[GLUTEN-11550][UT] Add GlutenTestSetWithSystemPropertyTrait, enable 6 suites, remove 7 TestHiveSingleton suites#11847
baibaichen wants to merge 2 commits intoapache:mainfrom
baibaichen:fix/11550-system-property-trait

Conversation

@baibaichen
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

1. Add GlutenTestSetWithSystemPropertyTrait — a reusable trait for test suites whose Spark parent creates per-test SparkContext/SparkSession (via LocalSparkContext, LocalSparkSession, or direct new SparkContext). It injects GlutenPlugin config via system properties so per-test sessions inherit it.

2. Enable 6 suites by switching to this trait:

  • GlutenSQLExecutionSuite — parent SQLExecutionSuite (internal new SparkContext)
  • GlutenSQLJsonProtocolSuite — parent SQLJsonProtocolSuite with LocalSparkSession
  • GlutenShufflePartitionsUtilSuite — parent ShufflePartitionsUtilSuite with LocalSparkContext
  • GlutenExternalAppendOnlyUnsafeRowArraySuite — parent with LocalSparkContext
  • GlutenUnsafeRowSerializerSuite — parent UnsafeRowSerializerSuite with LocalSparkSession
  • GlutenSparkSessionJobTaggingAndCancellationSuite — parent with LocalSparkContext

3. Remove 7 TestHiveSingleton suites that cannot load GlutenPlugin due to trait conflict (TestHiveSingleton.spark (protected val) vs Gluten trait spark (implicit protected def)). The non-Hive variants are already enabled. Updated excluded-spark-uts.md.

How was this patch tested?

All 6 enabled suites verified on spark41 and spark40 via run-scala-test.sh.

Related issue: #11550

@github-actions github-actions bot added the CORE works for Gluten Core label Mar 30, 2026
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@baibaichen baibaichen force-pushed the fix/11550-system-property-trait branch from 619c5dd to 6662b97 Compare March 30, 2026 15:04
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

baibaichen and others added 2 commits April 2, 2026 07:18
…e 6 suites

Add a reusable trait for test suites whose parent creates per-test
SparkContext/SparkSession (via LocalSparkContext/LocalSparkSession).
It injects GlutenPlugin config via system properties so per-test
sessions inherit it, avoiding shared session conflicts.

Enable 6 suites by switching to this trait:
- GlutenSQLExecutionSuite (SQLExecutionSuite: new SparkContext internally)
- GlutenSQLJsonProtocolSuite (SQLJsonProtocolSuite with LocalSparkSession)
- GlutenShufflePartitionsUtilSuite (ShufflePartitionsUtilSuite with LocalSparkContext)
- GlutenExternalAppendOnlyUnsafeRowArraySuite (with LocalSparkContext)
- GlutenUnsafeRowSerializerSuite (UnsafeRowSerializerSuite with LocalSparkSession)
- GlutenSparkSessionJobTaggingAndCancellationSuite (with LocalSparkContext)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lutenPlugin

Remove 7 test suites (spark40 + spark41) that extend TestHiveSingleton.
TestHiveSingleton.spark (protected val) conflicts with Gluten test traits'
spark (implicit protected def), making it impossible to load GlutenPlugin.

The non-Hive variants (e.g. GlutenBucketedReadWithoutHiveSupportSuite)
are already enabled and cover the same functionality.

Removed suites:
- GlutenBucketedReadWithHiveSupportSuite
- GlutenBucketedWriteWithHiveSupportSuite
- GlutenDisableUnnecessaryBucketedScanWithHiveSupportSuite
- GlutenCommitFailureTestRelationSuite
- GlutenJsonHadoopFsRelationSuite
- GlutenParquetHadoopFsRelationSuite
- GlutenSimpleTextHadoopFsRelationSuite

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@baibaichen baibaichen force-pushed the fix/11550-system-property-trait branch from 6662b97 to b303883 Compare April 2, 2026 07:45
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Run Gluten Clickhouse CI on x86

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.

1 participant