-
Notifications
You must be signed in to change notification settings - Fork 849
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
Enhance ListViewArray related docs #7007
Conversation
/// | ||
/// [Variable-size List Layout: ListView Layout]: https://arrow.apache.org/docs/format/Columnar.html#listview-layout | ||
/// This allows the offsets (and subsequently child data) to be out of order. It also | ||
/// allows take / filter operations to be implemented without copying the underlying data. |
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.
Would be nice to elaborate on this statement about take / filter operations
efficiency; I just kept it verbatim as it was already there before.
/// ├─────────────┤ ├───────┤ │ ├───┤ ├───┤ ├───┤ ├───┤ ├───┤ | ||
/// │ NULL │ │ (?,?) │ │ 0 │ │ ? │ │ ? │ │ │ 1 │ │ C │ │ 2 │ | ||
/// ├─────────────┤ ├───────┤ │ ├───┤ ├───┤ ├───┤ ├───┤ ├───┤ | ||
/// │ [D] │ │ (4,1) │ │ 1 │ │ 4 │ │ 1 │ │ │ ? │ │ ? │ │ 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.
Technically you don't need a value at index 3, list view even allows for overlapping ranges
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've added another example which shows this in use 👍
/// This allows the offsets (and subsequently child data) to be out of order. It also | ||
/// allows take / filter operations to be implemented without copying the underlying data. | ||
/// | ||
/// # Representation |
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.
😍
Whilst reviewing #6969 I noticed the docs for GenericListViewArray weren't as detailed compared to GenericListArray. Just enhancing the docs a bit, borrowing the example from GenericListArray to give a visual representation of how view differs from regular list layout.
Also update the datatype docs to remove the reference to internal buffers as that would belong with the GenericListViewArray doc instead of at datatype level.