[
https://issues.apache.org/jira/browse/ARROW-11845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Lamb reassigned ARROW-11845:
-----------------------------------
Assignee: Eric Burden
> [Rust] Debug implementation of Date32Array panics if array contains negative
> values
> -----------------------------------------------------------------------------------
>
> Key: ARROW-11845
> URL: https://issues.apache.org/jira/browse/ARROW-11845
> Project: Apache Arrow
> Issue Type: Bug
> Components: Rust
> Affects Versions: 3.0.0, 4.0.0
> Reporter: Eric Burden
> Assignee: Eric Burden
> Priority: Minor
> Labels: newbie
> Fix For: 3.0.1
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Attempting to print `Date32Array`s (and probably all Date/Time/Timestamp
> array types) using Rust's debug print format macro (`println!("\{:?}",
> date_32_array")`) causes a panic, as shown in the minimum reproducible
> example below:
>
> *Invocation:*
>
> {code:java}
> fn date32_print_panic() {
> let mut date_32_builder = Date32Builder::new(1);
> date_32_builder.append_value(-50).unwrap();
> let date_32_array = date_32_builder.finish();
> println!("{:?}", date_32_array);
> }
> {code}
>
> *Result:*
> {noformat}
> PrimitiveArray<Date32>
> [
> thread 'demo::tests::date32_print_panic' panicked at 'called
> `Option::unwrap()` on a `None` value',
> /home/.../rust/arrow/src/array/array_primitive.rs:226:54
> note: run with `RUST_BACKTRACE=1` environment variable to display a
> backtrace{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)