Skip to content

Fix Some(null) in ExpressionConverter bypassing expression transformation fallback#11757

Open
acvictor wants to merge 1 commit intoapache:mainfrom
acvictor:acvictor/nullSome
Open

Fix Some(null) in ExpressionConverter bypassing expression transformation fallback#11757
acvictor wants to merge 1 commit intoapache:mainfrom
acvictor:acvictor/nullSome

Conversation

@acvictor
Copy link
Contributor

What changes are proposed in this pull request?

This PR replaces None on the default case, so getOrElse correctly falls through.

Currently, tryTransformWithoutExpressionMapping returns Some(null) for unmatched expressions instead of None and the caller does .getOrElse { transformExpression(...) }. Since Some(null).getOrElse(fallback) returns null without invoking the fallback, some paths can silently get a null transformer which will lead to a downstream NPE.

How was this patch tested?

Existing UTs.

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

No

@github-actions
Copy link

Run Gluten Clickhouse CI on x86

@github-actions github-actions bot added the CORE works for Gluten Core label Mar 13, 2026
@acvictor acvictor marked this pull request as ready for review March 13, 2026 17:10
@acvictor
Copy link
Contributor Author

@baibaichen can you please review this PR? Thanks!

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