Skip to content

Update test output for Rust 1.58 release #1173

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arrow/src/buffer/immutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ impl std::ops::Deref for Buffer {
}

unsafe impl Sync for Buffer {}
// false positive, see https://github.com/apache/arrow-rs/pull/1169
#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl Send for Buffer {}

Expand Down
8 changes: 4 additions & 4 deletions parquet/src/record/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,9 +1081,9 @@ mod tests {
fn test_convert_float_to_string() {
assert_eq!(format!("{}", Field::Float(1.0)), "1.0");
assert_eq!(format!("{}", Field::Float(9.63)), "9.63");
assert_eq!(format!("{}", Field::Float(1e-15)), "0.000000000000001");
assert_eq!(format!("{}", Field::Float(1e-15)), "1e-15");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know if this is correct output or not

The code that handles formatting this is here: https://github.com/apache/arrow-rs/blob/master/parquet/src/record/api.rs#L716-L729

Which came in from @sunchao in the original donation 3 years ago in 6d12823

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same question as @jhorstmann on #1169

I don't know why we assert that exact formatting though. Also seems intentional because there is a range check in fmt::Display for parquet::record::api.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only just seeing this, but I created #1178 which preserves the old behaviour as far as I could guess at it. Happy for you to go with this PR though if you would prefer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1178 looks better to me .

assert_eq!(format!("{}", Field::Float(1e-16)), "1E-16");
assert_eq!(format!("{}", Field::Float(1e19)), "10000000000000000000.0");
assert_eq!(format!("{}", Field::Float(1e19)), "1e19");
assert_eq!(format!("{}", Field::Float(1e20)), "1E20");
assert_eq!(format!("{}", Field::Float(1.7976931E30)), "1.7976931E30");
assert_eq!(format!("{}", Field::Float(-1.7976931E30)), "-1.7976931E30");
Expand All @@ -1093,9 +1093,9 @@ mod tests {
fn test_convert_double_to_string() {
assert_eq!(format!("{}", Field::Double(1.0)), "1.0");
assert_eq!(format!("{}", Field::Double(9.63)), "9.63");
assert_eq!(format!("{}", Field::Double(1e-15)), "0.000000000000001");
assert_eq!(format!("{}", Field::Double(1e-15)), "1e-15");
assert_eq!(format!("{}", Field::Double(1e-16)), "1E-16");
assert_eq!(format!("{}", Field::Double(1e19)), "10000000000000000000.0");
assert_eq!(format!("{}", Field::Double(1e19)), "1e19");
assert_eq!(format!("{}", Field::Double(1e20)), "1E20");
assert_eq!(
format!("{}", Field::Double(1.79769313486E308)),
Expand Down