You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Eric Burden (Jira)" <ji...@apache.org> on 2021/03/02 22:17:00 UTC

[jira] [Created] (ARROW-11845) [Rust] Debug implementation of Date32Array panics if array contains negative values

Eric Burden created ARROW-11845:
-----------------------------------

             Summary: [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
             Fix For: 3.0.1


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)