Support new decimal types through SQL and fill-out other relatd functionality #17759
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Fills out support for more the new smaller decimal types.
What changes are included in this PR?
abs
functionAre these changes tested?
Yes, both new dedicated rust tests and additional dedicated SLT tests, in addition to existing functionality.
Are there any user-facing changes?
Yes - there are a few major user-facing changes:
before this PR, that test returned a 0.2 with a datatype of
Decimal128(2, 1)
. With this PR, this exact statement returns0
with a datatype ofInt32
, because it actually can't coerce aInt32
to aDecimal32(2, 1)
.Should it fall-back to floating point types? Some wide-enough predetermined decimal variant? I didn't debug this path fully yet, so the answer potentially hides somewhere there.
Either way - the second breaking change seems to be the biggest open issue I have in this PR, once there's consensus on the desired behavior here, fixing the code and tests appropriately is the easy part.