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

Add support for group members to have names #3068

Merged

Conversation

Shelnutt2
Copy link
Member

This adjusts the group API to allow members to have an optional name and introduces a new tiledb_group_get_member_by_name function. Names are helpful to have ways to add specific members but reference them directly by a given name. Names must be unique in the group. The name is optional, if a nullptr is based in then the name is not stored and the group member must be accessed through the index methods. The C++ API handles this with std::optional.

This request came in from @jp-dark as part of the group API review for use in applications like netcdf. I'm tagging a larger-than normal reviewer list for awareness as this will be a "breaking" change in the unreleased API (compared to existing RCs). This was briefly discussed with @aaronwolen and @stavrospapadopoulos before making the change. In general everyone agreed on the usefulness so we're proposing to add it to the initial groups in 2.8. The overall change set is small, but of course Cap'n Proto was updated so thats majority of the line number changes.


TYPE: IMPROVEMENT
DESC: Add ability to store (optional) name with group member

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #16795: Add support for name/alias to group members.

@Shelnutt2 Shelnutt2 requested a review from bdeng-xt April 11, 2022 22:30
Shelnutt2 and others added 4 commits April 12, 2022 10:11
This adjusts the group API to allow members to have a name and
introduces a new `tiledb_group_get_member_by_name` function. Names are
helpful to have ways to add specific members but refernece them directly
by a given name. Names must be unique in the group.
@Shelnutt2 Shelnutt2 force-pushed the sethshelnutt/sc-16795/add-support-for-name-alias-to-group-members branch from ac1bf65 to def520b Compare April 12, 2022 14:17
tiledb/sm/group/group.cc Show resolved Hide resolved
@Shelnutt2 Shelnutt2 merged commit 87905fb into dev Apr 12, 2022
@Shelnutt2 Shelnutt2 deleted the sethshelnutt/sc-16795/add-support-for-name-alias-to-group-members branch April 12, 2022 22:28
@github-actions
Copy link
Contributor

The backport to release-2.8 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-2.8 release-2.8
# Navigate to the new working tree
cd .worktrees/backport-release-2.8
# Create a new branch
git switch --create backport-3068-to-release-2.8
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 87905fbe0666bea5e9ef1dbcf86604a26586bd28
# Push it to GitHub
git push --set-upstream origin backport-3068-to-release-2.8
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-2.8

Then, create a pull request where the base branch is release-2.8 and the compare/head branch is backport-3068-to-release-2.8.

Shelnutt2 added a commit that referenced this pull request Apr 12, 2022
* Add support for group members to have names

This adjusts the group API to allow members to have a name and
introduces a new `tiledb_group_get_member_by_name` function. Names are
helpful to have ways to add specific members but refernece them directly
by a given name. Names must be unique in the group.

* generate capnp files for windows

* Add missing #include <optional>

* Adjust test tags

* C++ group unit tests should use timestamps

* Update missed TILEDB_NOEXCEPT in tiledb_serialization.h

* Add missing buffer free in unit test

* Format

* use same entity for '.find()' and subsequent ' == .end()' check

Co-authored-by: bdeng-xt <bdeng.xt@gmail.com>
Co-authored-by: dhoke4tdb <david.hoke@tiledb.com>
Shelnutt2 added a commit that referenced this pull request Apr 13, 2022
* Add support for group members to have names

This adjusts the group API to allow members to have a name and
introduces a new `tiledb_group_get_member_by_name` function. Names are
helpful to have ways to add specific members but refernece them directly
by a given name. Names must be unique in the group.

* generate capnp files for windows

* Add missing #include <optional>

* Adjust test tags

* C++ group unit tests should use timestamps

* Update missed TILEDB_NOEXCEPT in tiledb_serialization.h

* Add missing buffer free in unit test

* Format

* use same entity for '.find()' and subsequent ' == .end()' check

Co-authored-by: bdeng-xt <bdeng.xt@gmail.com>
Co-authored-by: dhoke4tdb <david.hoke@tiledb.com>

Co-authored-by: bdeng-xt <bdeng.xt@gmail.com>
Co-authored-by: dhoke4tdb <david.hoke@tiledb.com>
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.

7 participants