-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[HUDI-7443] Fix decimal conversion with legacy bytes type #10756
[HUDI-7443] Fix decimal conversion with legacy bytes type #10756
Conversation
if (schema.getType() == Schema.Type.BYTES) { | ||
return HoodieAvroUtils.DECIMAL_CONVERSION.toBytes(bd, schema, decimal); | ||
} else { | ||
return HoodieAvroUtils.DECIMAL_CONVERSION.toFixed(bd, schema, decimal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this fix, hudi will throw an exception here since bytes decimal can't call toFixed
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch ~
@hudi-bot run azure |
|
This may have also fixed https://issues.apache.org/jira/browse/HUDI-7388, will test and close out that issue if so. Edit: That linked issue appears to still be present in 0.15.0, within which this PR's fix should have been included. |
Change Logs
Fix decimal conversion with legacy bytes type
Impact
Fix decimal conversion with legacy bytes type
Risk level (write none, low medium or high below)
low
Documentation Update
NONE
Contributor's checklist