Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Apr 18, 2023

Which issue does this PR close?

Closes #5825.

Rationale for this change

What changes are included in this PR?

This issue was fixed at the upstream. Now adding a test for verification.

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Apr 18, 2023
Comment on lines +596 to +599
query R
select try_cast(1234567 as decimal(7,3));
----
NULL
Copy link
Member Author

Choose a reason for hiding this comment

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

I've verified that this returns incorrect result 1234.567 before the fix.

@viirya
Copy link
Member Author

viirya commented Apr 18, 2023

Thanks @Dandandan

@Dandandan Dandandan merged commit cf27870 into apache:main Apr 18, 2023
@Dandandan
Copy link
Contributor

Thanks @viirya

@viirya viirya deleted the cast_integer_decimal_precision branch April 18, 2023 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataFusion incorrectly handle precision overflow when casting from integer to decimal

3 participants