Skip to content

[GLUTEN-11550][CORE][UT] Fix GlutenSingleJoinSuite for Spark 4.0+#11577

Merged
baibaichen merged 1 commit intoapache:mainfrom
baibaichen:fix/left-single-join-fallback
Feb 6, 2026
Merged

[GLUTEN-11550][CORE][UT] Fix GlutenSingleJoinSuite for Spark 4.0+#11577
baibaichen merged 1 commit intoapache:mainfrom
baibaichen:fix/left-single-join-fallback

Conversation

@baibaichen
Copy link
Copy Markdown
Contributor

@baibaichen baibaichen commented Feb 6, 2026

What changes are proposed in this pull request?

Add support for LeftSingle join type to enable proper fallback to Spark execution in Spark 4.0+.

LeftSingle is a new join type introduced in Spark 4.0 for scalar subquery correlation. When Gluten encounters this join type, it should gracefully fall back to Spark execution since Substrait does not support it yet.

This enables GlutenSingleJoinSuite to pass for both Spark 4.0 and 4.1.

Fix #11550

How was this patch tested?

  • All 36 tests in GlutenSingleJoinSuite pass for both Spark 4.0 and 4.1
  • Verified fallback works correctly with log message:
    "Validation failed for plan: ShuffledHashJoin, due to: Unsupported join type of LeftSingle for substrait: UNRECOGNIZED"

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Opus 4.5

## What changes were proposed in this pull request?

Add support for LeftSingle join type to enable proper fallback to Spark
execution in Spark 4.0+.

## Why are the changes needed?

LeftSingle is a new join type introduced in Spark 4.0 for scalar subquery
correlation. When Gluten encounters this join type, it should gracefully
fall back to Spark execution since Substrait does not support it yet.

Before this fix, the test `GlutenSingleJoinSuite` failed with:
```
IllegalArgumentException: ShuffledHashJoinExecTransformer not take
LeftSingle as the JoinType
```

The root cause was that exceptions were thrown during plan transformation
(when accessing `output`/`schema` properties) before validation could
detect the unsupported join type and trigger fallback.

## How was this patch tested?

- All 36 tests in GlutenSingleJoinSuite pass for both Spark 4.0 and 4.1
- Verified fallback works correctly with log message:
  "Validation failed for plan: ShuffledHashJoin, due to:
   - Unsupported join type of LeftSingle for substrait: UNRECOGNIZED"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added the CORE works for Gluten Core label Feb 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 6, 2026

Run Gluten Clickhouse CI on x86

@baibaichen
Copy link
Copy Markdown
Contributor Author

@zhouyuan @zhztheplayer pelase review this pr

@baibaichen baibaichen changed the title [GLUTEN-11550][UT] Fix GlutenSingleJoinSuite for Spark 4.0+ [GLUTEN-11550][CORE][UT] Fix GlutenSingleJoinSuite for Spark 4.0+ Feb 6, 2026
@baibaichen baibaichen merged commit ccd40a9 into apache:main Feb 6, 2026
64 checks passed
@baibaichen baibaichen deleted the fix/left-single-join-fallback branch February 6, 2026 15:15
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.

Spark 4.x: Tracking disabled test suites

3 participants