Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-8499][VL] Fix the logic of cast expression #8500

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wForget
Copy link
Member

@wForget wForget commented Jan 10, 2025

What changes were proposed in this pull request?

The cast expression in ansi mode not only returns null on error, but also has different calculation logic from non-ansi mode, so we should fall back the cast expression in ansi mode.

Like cast string to long, they define different allowDecimal:

https://github.com/apache/spark/blob/3c831ebf7cd81c2ed774c692b2da7a35ce0fa252/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L1612

https://github.com/apache/spark/blob/3c831ebf7cd81c2ed774c692b2da7a35ce0fa252/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L1813

Closes #8499

How was this patch tested?

unit test

@github-actions github-actions bot added CORE works for Gluten Core VELOX labels Jan 10, 2025
Copy link

#8499

Copy link

Run Gluten ClickHouse CI on ARM

Copy link

Run Gluten ClickHouse CI on ARM

@FelixYBW
Copy link
Contributor

Velox doesn't support ANSI mode yet, we should fallback to Vanilla spark once user set ANSI mode. It will be big issue on Spark4.0

Copy link

Run Gluten ClickHouse CI on ARM

@wForget
Copy link
Member Author

wForget commented Jan 11, 2025

Velox doesn't support ANSI mode yet, we should fallback to Vanilla spark once user set ANSI mode. It will be big issue on Spark4.0

Yes, there are still a lot of works to support ansi mode, until then we have to fallback it to avoid data consistency issues.

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.

[VL] Result mismatch of try_cast
2 participants