-
Notifications
You must be signed in to change notification settings - Fork 873
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
expand docs for FixedSizeListArray #4622
Conversation
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.
Thank you @smiklos -- I think this is very nice 👌
/// │ [C,NULL] │ │ 1 │ │ │ 0 │ │ NULL │ │ 2 | ||
/// └─────────────┘ │ └───┘ ├───┤ ├──────┤ │ | ||
/// | │ 0 │ │ NULL │ │ 3 |
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.
When an array element is null, the values can be anything (valid). So I suggest using ????
to show that the contents could be something unknown:
/// │ [C,NULL] │ │ 1 │ │ │ 0 │ │ NULL │ │ 2 | |
/// └─────────────┘ │ └───┘ ├───┤ ├──────┤ │ | |
/// | │ 0 │ │ NULL │ │ 3 | |
/// │ [C,NULL] │ │ 1 │ │ │ 0 │ │ ???? │ │ 2 | |
/// └─────────────┘ │ └───┘ ├───┤ ├──────┤ │ | |
/// | │ 0 │ │ ???? │ │ 3 |
/// Logical Values │ Validity ├───┤ ├──────┤ │ | ||
/// (nulls) │ │ 1 │ │ C │ │ 4 | ||
/// │ ├───┤ ├──────┤ │ | ||
/// │ │ 0 │ │ NULL │ │ 5 |
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.
Same thing here:
/// │ │ 0 │ │ NULL │ │ 5 | |
/// │ │ 0 │ │ ??? │ │ 5 |
@@ -60,6 +113,9 @@ use std::sync::Arc; | |||
/// assert_eq!( &[3, 4, 5], list1.as_any().downcast_ref::<Int32Array>().unwrap().values()); | |||
/// assert_eq!( &[6, 7, 8], list2.as_any().downcast_ref::<Int32Array>().unwrap().values()); | |||
/// ``` | |||
/// | |||
/// [`StringArray`]: crate::array::StringArray | |||
/// An array of [fixed size arrays](https://arrow.apache.org/docs/format/Columnar.html#fixed-size-list-layout) |
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.
I think this link formatting is a little off
/// An array of [fixed size arrays](https://arrow.apache.org/docs/format/Columnar.html#fixed-size-list-layout) | |
/// [fixed size arrays]: https://arrow.apache.org/docs/format/Columnar.html#fixed-size-list-layout |
Pushed the recommended changes @alamb . Thanks for the review! |
Thank you |
Which issue does this PR close?
Relates to #4607
Rationale for this change
Added extra docs to FixedSizeListArray to document its logical and physical layout.
What changes are included in this PR?
Just docs
Are there any user-facing changes?
Noe
Noe