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 api for getting array schema of a fragment #2468

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

bdeng-xt
Copy link
Contributor

@bdeng-xt bdeng-xt commented Aug 26, 2021

This PR adds c and cpp api functions for getting the array schema of a fragment from fragment info object. We store array schema name in the meta data of each fragment. Now we can get the array schema in capi by the tiledb_fragment_info_get_array_schema function. Also a member function array_schema is added to FragmentInfo class in cpp-api.


TYPE: FEATURE
DESC: Add c and cpp api functions for getting the array schema of a fragment

TYPE: C_API
DESC: Add tiledb_fragment_info_get_array_schema functions for getting the array schema of a fragment

TYPE: CPP_API
DESC: Add FragmentInfo::array_schema functions for getting the array schema of a fragment

@shortcut-integration
Copy link

This pull request has been linked to Clubhouse Story #9809: Add c/cpp api for getting array schema of a fragment.

Copy link
Member

@Shelnutt2 Shelnutt2 left a comment

Choose a reason for hiding this comment

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

One minor change needed in the c-api.

tiledb/sm/c_api/tiledb.cc Show resolved Hide resolved
}

EncryptionKey encryption_key;
RETURN_NOT_OK(storage_manager_->load_array_schema_from_uri(
Copy link
Member

Choose a reason for hiding this comment

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

There is a deficiency here in that we'll be loading the schema for every fragment without any caching. I realize we don't have the openarray object here so we can't use the normal schema map. Lets open a a story for a future improvement here but it doesn't block this PR.

Copy link
Member

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

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

LGTM

@Shelnutt2 Shelnutt2 merged commit 639bd3f into dev Aug 27, 2021
@Shelnutt2 Shelnutt2 deleted the bd/ch9809-getting-array-schema-of-a-fragment branch August 27, 2021 13:57
github-actions bot pushed a commit that referenced this pull request Aug 27, 2021
* add api for getting array schema of a fragment

* delete array_schema pointer when error is caught
Shelnutt2 pushed a commit that referenced this pull request Aug 27, 2021
* add api for getting array schema of a fragment

* delete array_schema pointer when error is caught

Co-authored-by: bin.deng <76831442+bdeng-xt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants