[GLUTEN-11550][VL] Enable GlutenDataFrameSubquerySuite for Spark 4.1#11727
Open
baibaichen wants to merge 1 commit intoapache:mainfrom
Open
[GLUTEN-11550][VL] Enable GlutenDataFrameSubquerySuite for Spark 4.1#11727baibaichen wants to merge 1 commit intoapache:mainfrom
baibaichen wants to merge 1 commit intoapache:mainfrom
Conversation
|
Run Gluten Clickhouse CI on x86 |
1d56aaa to
aab8cd1
Compare
|
Run Gluten Clickhouse CI on x86 |
Fix struct join key validation to align with Spark's equalsStructurally semantics. Remove struct field name comparison in sameType() since Spark's HashJoin only checks structural type compatibility, not field names. Also catch exceptions during offload attempt in validation pipeline to allow graceful fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
aab8cd1 to
d72f513
Compare
|
Run Gluten Clickhouse CI on x86 |
1 similar comment
Contributor
Author
|
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 are proposed in this pull request?
Fix struct join key validation and enable
GlutenDataFrameSubquerySuitefor Spark 4.1.Spark 4.1 added
isin(Dataset)API which creates struct IN subquery predicates. These are converted toBroadcastHashJoinwith struct-typed join keys where field names may differ between sides (e.g.,struct(a, b)vsstruct(c, d)).Changes:
JoinExecTransformer.scala— Remove struct field name comparison insameType()to align with Spark'sDataType.equalsStructurally(ignoreNullability=true)semantics. Spark's nativeHashJoinonly checks structural type compatibility (field count + field types by position), not field names. This allows struct IN subqueries to be offloaded to Velox natively.VeloxTestSettings.scala— EnableGlutenDataFrameSubquerySuitefor Spark 4.1 (was previously disabled with// TODO: 4.x).Evidence — Spark's join key validation does NOT check struct field names:
Spark
HashJoin.scalausesDataType.equalsStructurally(identical in v4.0.1):DataType.equalsStructurallyforStructTypeonly compares field count + field types by position — nol.name == r.name:Gluten's
sameType()had an extral.name.equalsIgnoreCase(r.name)check that was more restrictive than Spark's own validation.How was this patch tested?
GlutenDataFrameSubquerySuiteon Spark 4.1: all 47 tests passed (struct IN subqueries offloaded to Velox natively)GlutenDataFrameSubquerySuiteon Spark 4.0: all 40 tests passed (no regression)Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot
Related issue: #11550