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

[jira] [Assigned] (ARROW-11594) [Rust] Support pretty printing with NullArrays

     [ https://issues.apache.org/jira/browse/ARROW-11594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Lamb reassigned ARROW-11594:
-----------------------------------

    Assignee: Andrew Lamb

> [Rust] Support pretty printing with NullArrays
> ----------------------------------------------
>
>                 Key: ARROW-11594
>                 URL: https://issues.apache.org/jira/browse/ARROW-11594
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust
>            Reporter: Andrew Lamb
>            Assignee: Andrew Lamb
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> The whole point of `NullArray::new_with_type` is to to be able to cheaply construct entirely null columns, with a smaller memory footprint.
> Currently trying to print them out causes a painic:
> {code}
>     #[test]
>     fn test_pretty_format_null() -> Result<()> {
>         // define a schema.
>         let schema = Arc::new(Schema::new(vec![
>             Field::new("a", DataType::Utf8, true),
>             Field::new("b", DataType::Int32, true),
>         ]));
>         let num_rows = 4;
>         // define data (null)
>         let batch = RecordBatch::try_new(
>             schema,
>             vec![
>                 Arc::new(NullArray::new_with_type(num_rows, DataType::Utf8)),
>                 Arc::new(NullArray::new_with_type(num_rows, DataType::Int32)),
>             ],
>         )?;
>         let table = pretty_format_batches(&[batch])?;
> }
> {code}
> Panics:
> {code}
> failures:
> ---- util::pretty::tests::test_pretty_format_null stdout ----
> thread 'util::pretty::tests::test_pretty_format_null' panicked at 'called `Option::unwrap()` on a `None` value', arrow/src/util/display.rs:201:27
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)