[GLUTEN-11550][UT] Enable 30 disabled test suites for Spark 4.0/4.1#11816
Open
baibaichen wants to merge 11 commits intoapache:mainfrom
Open
[GLUTEN-11550][UT] Enable 30 disabled test suites for Spark 4.0/4.1#11816baibaichen wants to merge 11 commits intoapache:mainfrom
baibaichen wants to merge 11 commits intoapache:mainfrom
Conversation
Inject GlutenPlugin via System.setProperty so per-test SparkSessions created by the parent suite load it. Use GlutenTestsCommonTrait to avoid creating a persistent session that conflicts with per-test SparkContext creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tionsUtilSuite, GlutenExternalAppendOnlyUnsafeRowArraySuite Same pattern as GlutenSQLExecutionSuite: these suites create per-test SparkContexts which conflict with GlutenTestsTrait's persistent session. Switch to GlutenTestsCommonTrait + inject GlutenPlugin via System.setProperty so each test's SparkSession loads it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Override 'unsupported mode' test: Gluten's DataFrame-based checkEvaluation throws AnalysisException directly instead of wrapping it in TestFailedException. The overridden test intercepts AnalysisException. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use System.setProperty to inject GlutenPlugin into per-test SparkSessions created by parent suite (LocalSparkSession pattern). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Override SPARK-37779 test to find VeloxColumnarToRowExec (extends ColumnarToRowExecBase) instead of ColumnarToRowExec. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enable suite with .exclude for 'update with NOT NULL checks' — Velox throws VeloxUserError wrapped as SparkException instead of the expected SparkRuntimeException. Root cause: Velox native NOT NULL check uses different exception chain than Spark's AssertNotNull expression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enable with .exclude() for specific failing tests: - GlutenWholeTextFileV1Suite: exclude jar:file: URI test - GlutenWholeTextFileV2Suite: exclude jar:file: URI test - GlutenScalaUDFSuite: exclude Variant encoder test (Spark 4.1 bug) - GlutenExpressionEvalHelperSuite: exclude 2 tests (different failure names) - GlutenToPrettyStringSuite: exclude timestamp timezone test (Velox UTC) - GlutenGroupBasedUpdateTableSuite: exclude NOT NULL exception type test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enable plan-structure and other suites with .exclude() for failing tests: | Suite | Passed | Excluded | Root Cause | |-------|:------:|:--------:|------------| | GlutenJoinHintSuite | 17 | 1 | CartesianProduct not supported | | GlutenExplainSuite | 20 | 4 | WholeStageCodegen/FileScan in explain | | GlutenDataSourceScanExecRedactionSuite | 2 | 2 | FileScan replaced by native scan | | GlutenDataSourceV2ScanExecRedactionSuite | 1 | 2 | BatchScan replaced | | GlutenInsertSortForLimitAndOffsetSuite | 0 | 6 | TakeOrderedAndProject replaced | | GlutenProjectedOrderingAndPartitioningSuite | 1 | 9 | SinglePartition vs HashPartitioning | | GlutenRemoveRedundantProjectsSuite | 3 | 14 | Plan tree structure differs | | GlutenSimpleSQLViewSuite | 52 | 2 | Error condition + query result | | GlutenPlannerSuite | 55 | 21 | TakeOrderedAndProject/sort/partitioning | | GlutenRemoveRedundantSortsSuite | 0 | 5 | SortExec replaced | | GlutenObjectExpressionsSuite | 13 | 15 | Spark 4.1 encoder API change | Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…engine excludes - GlutenOrderingSuite: 54 passed, 2 TimeType excluded - GlutenHiveResultSuite: 10 passed, 1 TimeType excluded - GlutenCollationRegexpExpressionsSuite: 3 passed, 1 Velox split excluded - GlutenColumnarRulesSuite: 2 passed, 1 Transition excluded - RandomDataGeneratorSuite: kept TODO (232 TimeType failures, impractical to exclude individually) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rait import spark40 does not have org.apache.spark.sql.shim.GlutenTestsTrait (that shim only exists for spark41). Use org.apache.spark.sql.GlutenTestsTrait instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Root cause: Gluten's offload rules replace Spark physical plan nodes with Transformer nodes but don't propagate LOGICAL_PLAN_TAG. This tag is used by Spark's LogicalPlanTagInSparkPlanSuite to verify logical-physical plan linkage. Three fixes applied: 1. LegacyOffload: propagate LOGICAL_PLAN_TAG from original node to offloaded Transformer node using setTagValue (non-recursive to avoid tagging Exchange). 2. HeuristicTransform.Simple: same tag propagation for the simple offload path. 3. PushDownFilterToScan: copyTagsFrom when creating new scan via withNewPushdownFilters (case class copy loses tags). Additionally, GlutenLogicalPlanTagInSparkPlanSuite overrides checkGeneratedCode with a Gluten-aware version that recognizes Transformer node types in pattern matching (joins, aggregates, windows, scans, exchanges, etc.). 5 queries excluded (q23b, q40, q80, q78-v2.7, q80a-v2.7) where post-transform rules create new ProjectExecTransformer without tag propagation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Run Gluten Clickhouse CI on x86 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Enable 13 test suites that were disabled in #11800 by fixing root causes:
Real fixes (7 suites): Suites that create per-test SparkContexts conflicted with GlutenPlugin's persistent session. Fixed by switching to
GlutenTestsCommonTrait+ injecting GlutenPlugin viaSystem.setPropertyso each test's SparkSession loads it.Targeted excludes (6 suites): Enabled with
.exclude()for specific tests that cannot pass under Gluten:update with NOT NULL checksreading text file with option wholetext=truereading text file with option wholetext=truevariant basic output variantTimestamp as pretty stringsHow was this patch tested?
All 13 suites verified on spark41 via
run-scala-test.sh --mvnd. SparkContext-conflict suites also verified on spark40.Related issue: #11550