-
Notifications
You must be signed in to change notification settings - Fork 819
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
Fix serialization of large integers in JSON (#5038) #5042
Fix serialization of large integers in JSON (#5038) #5042
Conversation
@@ -180,7 +180,7 @@ impl<'a> Tape<'a> { | |||
TapeElement::Null => out.push_str("null"), | |||
TapeElement::I64(high) => match self.get(idx + 1) { | |||
TapeElement::I32(low) => { | |||
let val = (high as i64) << 32 | low as i64; | |||
let val = (high as i64) << 32 | (low as u32) as i64; |
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.
Can you confirm this code is only used for debugging? it wasn't clear to me that this is covered by a test, but if it is only used in
arrow-rs/arrow-json/src/reader/tape.rs
Line 210 in 08b8cba
self.serialize(&mut out, idx); |
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.
It's only used in error messages
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.
…0.0_maintenance` (#5059) * Fix serialization of large integers (#5038) (#5042) * fmt --------- Co-authored-by: Raphael Taylor-Davies <[email protected]>
Which issue does this PR close?
Closes #5038
Rationale for this change
When converting i32 to i64 by default Rust will sign extend, we don't want this behaviour
What changes are included in this PR?
Are there any user-facing changes?