Skip to content
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

[no ci] Add empty-columns section to the libcudf developer guide #17183

Open
wants to merge 3 commits into
base: branch-24.12
Choose a base branch
from

Conversation

davidwendt
Copy link
Contributor

Description

Adds a section on Empty Columns to the libcudf DEVELOPER_GUIDE

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team doc Documentation libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Oct 25, 2024
@davidwendt davidwendt self-assigned this Oct 25, 2024
@davidwendt davidwendt requested a review from a team as a code owner October 25, 2024 17:45
# Empty Columns

The libcudf columns support empty, typed content. These columns have no data and no validity mask.
Empty strings columns may or may not contain a child offsets column. If is undefined behavior (UB)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Empty strings columns may or may not contain a child offsets column. If is undefined behavior (UB)
Empty strings columns may or may not contain a child offsets column. It is undefined behavior (UB)

Comment on lines 1493 to 1494
Use the `cudf::make_empty_column()` to create fixed-width and strings columns.
Use the `cudf::empty_like()` to create an empty column from an existing `cudf::column_view`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Use the `cudf::make_empty_column()` to create fixed-width and strings columns.
Use the `cudf::empty_like()` to create an empty column from an existing `cudf::column_view`.
Use `cudf::make_empty_column()` to create fixed-width and strings columns.
Use `cudf::empty_like()` to create an empty column from an existing `cudf::column_view`.


The libcudf columns support empty, typed content. These columns have no data and no validity mask.
Empty strings columns may or may not contain a child offsets column. If is undefined behavior (UB)
to access the children of an empty strings column. Nested columns like lists and structs may
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any behavior like this in lists columns?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean accessing children for an empty lists column?
I think the next sentence describes lists and structs may have children.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wondering whether a lists column created with empty_like() always has an offset child 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.

It looks like it does but it would probably be prudent to say accessing it UB as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team doc Documentation libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants