Fix serialization of large integers in JSON (#5038)#5042
Merged
tustvold merged 1 commit intoapache:masterfrom Nov 6, 2023
Merged
Fix serialization of large integers in JSON (#5038)#5042tustvold merged 1 commit intoapache:masterfrom
tustvold merged 1 commit intoapache:masterfrom
Conversation
alamb
reviewed
Nov 6, 2023
| 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; |
Contributor
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
It's only used in error messages
alamb
approved these changes
Nov 6, 2023
alamb
pushed a commit
to alamb/arrow-rs
that referenced
this pull request
Nov 8, 2023
alamb
added a commit
that referenced
this pull request
Nov 9, 2023
…0.0_maintenance` (#5059) * Fix serialization of large integers (#5038) (#5042) * fmt --------- Co-authored-by: Raphael Taylor-Davies <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
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?