Fix overflow while decoding timestamp#4
Closed
cxzl25 wants to merge 3 commits intoauron-project:v0.6.0-blaze-kwaifrom
Closed
Fix overflow while decoding timestamp#4cxzl25 wants to merge 3 commits intoauron-project:v0.6.0-blaze-kwaifrom
cxzl25 wants to merge 3 commits intoauron-project:v0.6.0-blaze-kwaifrom
Conversation
Collaborator
cxzl25
commented
Nov 12, 2025
c91facb to
95aef4d
Compare
cxzl25
commented
Nov 12, 2025
| DataType::Decimal { | ||
| precision, scale, .. | ||
| } => ArrowDataType::Decimal128(*precision as u8, *scale as i8), // TODO: safety of cast? | ||
| DataType::Timestamp { .. } => ArrowDataType::Timestamp(TimeUnit::Nanosecond, None), |
Collaborator
Author
There was a problem hiding this comment.
use Nanosecond i64 may overflow
datafusion-orc/src/encoding/timestamp.rs
Line 166 in 172183f
95aef4d to
193b2c0
Compare
cxzl25
commented
Nov 12, 2025
| assert!(reader.collect::<Result<Vec<_>, _>>().is_err()); | ||
| } | ||
| // #[test] | ||
| // pub fn overflowing_timestamps_test() { |
Collaborator
Author
There was a problem hiding this comment.
After modifying it to microsecond, overflow can be avoided.
193b2c0 to
a6985ec
Compare
Collaborator
Author
|
Upstream orc-rust has been merged |
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.