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

HIVE-25263: CAST operation with decimal resulting to NULL #2406

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

lcspinter
Copy link
Contributor

@lcspinter lcspinter commented Jun 17, 2021

What changes were proposed in this pull request?

The WritableConstantHiveDecimalObjectInspector should use return the precision value stored in the TypeInfo object.

Why are the changes needed?

Using Cast to decimal together with and addition operation might result in NULL values.
SELECT CAST('99' AS DECIMAL(5,2)) + 8;

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manual test

@lcspinter lcspinter merged commit afb1586 into apache:master Jul 9, 2021
@lcspinter lcspinter deleted the HIVE-25263 branch July 9, 2021 08:46
dengzhhu653 pushed a commit to dengzhhu653/hive that referenced this pull request Dec 15, 2022
…) (Laszlo Pinter, reviewed by Marta Kuczora and Marton Bod)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants