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

Support reading negative zero in MongoDB #18777

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Aug 23, 2023

Release notes

(x) Release notes are required, with the following suggested text:

# MongoDB
* Fix failure when reading negative zero in `decimal` type. ({issue}`18777`)

@cla-bot cla-bot bot added the cla-signed label Aug 23, 2023
@github-actions github-actions bot added the mongodb MongoDB connector label Aug 23, 2023
else {
BigDecimal result = decimal.bigDecimalValue();
type.writeObject(output, Decimals.encodeScaledValue(result, decimalType.getScale()));
}
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 didn't touch guessFieldType method because the precision and scale are still unclear in the case of negative zero.

@ebyhr ebyhr marked this pull request as ready for review August 23, 2023 21:56
@ebyhr ebyhr requested a review from krvikash August 23, 2023 21:56
@ebyhr ebyhr force-pushed the ebi/mongodb-decimal128-negative-zero branch from 3a31ee9 to 2717958 Compare August 24, 2023 06:59
@ebyhr ebyhr merged commit 2684776 into trinodb:master Aug 24, 2023
@ebyhr ebyhr deleted the ebi/mongodb-decimal128-negative-zero branch August 24, 2023 07:00
@github-actions github-actions bot added this to the 425 milestone Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed mongodb MongoDB connector
Development

Successfully merging this pull request may close these issues.

2 participants