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

Add test for handling precision overflow when casting from integer to decimal #6041

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions datafusion/core/tests/sqllogictests/test_files/decimal.slt
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,8 @@ query TB
select arrow_typeof(null <= a), null <= a from (values (1.1::decimal)) as t(a);
----
Boolean NULL

query R
select try_cast(1234567 as decimal(7,3));
----
NULL
Comment on lines +596 to +599
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.