-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix Display for List #8261
Fix Display for List #8261
Conversation
datafusion/common/src/scalar.rs
Outdated
)?, | ||
ScalarValue::List(arr) | ScalarValue::FixedSizeList(arr) => { | ||
// TODO: Remove NullArray | ||
// There are NullArray(0) currently, so we need to check the length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may file an ticket to track it
datafusion/common/src/scalar.rs
Outdated
write!(f, "[]")? | ||
} else { | ||
let options = FormatOptions::default().with_display_error(true); | ||
// TODO: No way to map to fmt::Error yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.rs/arrow/latest/arrow/util/display/struct.ArrayFormatter.html#method.try_new says it returns an error if the type can't be formatted. Since this code knows that it is always a ListArray I think it would be ok to simply unwrap the error (ArrayFormatter::try_new(...).unwrap()
)
Continue on this after |
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
42b8939
to
6727b92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me -- thank you @jayzhan211
Which issue does this PR close?
Closes #8259.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?