Skip to content

[CORE][VL] Handle exception in Schema validation for unsupported join types#11387

Merged
liuneng1994 merged 4 commits intoapache:mainfrom
Surbhi-Vijay:FixJoinValidation
Jan 14, 2026
Merged

[CORE][VL] Handle exception in Schema validation for unsupported join types#11387
liuneng1994 merged 4 commits intoapache:mainfrom
Surbhi-Vijay:FixJoinValidation

Conversation

@Surbhi-Vijay
Copy link
Contributor

What changes are proposed in this pull request?

Schema validation fails during validation phase for unsupported join types. When an unsupported join type is encountered, it throws IllegalArgumentException . This patch catches the exception and adds validation failure msg. This helps in falling back unsupported join type to Spark and query successfully completes.

This issue was encountered with Spark-4.0 where new join type LeftSingle has been introduced.
See: #11372

How was this patch tested?

Tested locally by running spark testcase with native session enabled.

@github-actions github-actions bot added the CORE works for Gluten Core label Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Run Gluten Clickhouse CI on x86

@Surbhi-Vijay Surbhi-Vijay changed the title Handle exception in Schema validation for unsupported join types [BUG-FIX] Handle exception in Schema validation for unsupported join types Jan 9, 2026
@Surbhi-Vijay
Copy link
Contributor Author

image

// LeftSingle join in BroadcastHashJoinExecTransformer.
ValidationResult.failed(
s"Failed to retrieve schema for ${this.nodeName}, due to: ${e.getMessage}")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we match Exception to avoid more special case? maybe IllegalArgumentException will be throw in somewhere else.

Copy link
Contributor Author

@Surbhi-Vijay Surbhi-Vijay Jan 12, 2026

Choose a reason for hiding this comment

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

Do you mean matching the exception message or changing the exception itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it should be okay to check IllegalArgumentException. We are catching this exception during validation phase and even if the validation is failing at some other place than joins, it should fallback to Spark.

@Yohahaha Yohahaha changed the title [BUG-FIX] Handle exception in Schema validation for unsupported join types [VL] Handle exception in Schema validation for unsupported join types Jan 12, 2026
@Yohahaha Yohahaha changed the title [VL] Handle exception in Schema validation for unsupported join types [CORE][VL] Handle exception in Schema validation for unsupported join types Jan 12, 2026
@github-actions github-actions bot added the VELOX label Jan 12, 2026
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@github-actions
Copy link

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@liuneng1994 liuneng1994 merged commit 3c0e59f into apache:main Jan 14, 2026
117 of 119 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 VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants