Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Oct 3, 2020

Null values should be printed as "" when pretty printing. Prior to this PR, , null values in primitive arrays were rendered as the type's default value as pointed out by @jhorstmann on #8331 (comment)

@alamb alamb changed the title [Rust] Pretty print null PrimitiveTypes as empty strings ARROW-10169: [Rust] Pretty print null PrimitiveTypes as empty strings Oct 3, 2020
/// Get the value at the given row in an array as a string
fn array_value_to_string(column: array::ArrayRef, row: usize) -> Result<String> {
match column.data_type() {
DataType::Utf8 => Ok(column
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was no reason Utf8 couldn't use the same make_string! macro so I unified the code paths

@github-actions
Copy link

github-actions bot commented Oct 3, 2020

@jhorstmann
Copy link
Contributor

LGTM

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants