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

Compound subsetting through H5Tconvert and field selection #118

Merged

Conversation

mattjala
Copy link
Collaborator

Alternative implementation of #107. Compound reads are handled through H5Tconvert. The previous issue with this - that H5Tconvert would overwrite the unused fields - is fixed by using the background buffer.

Compound writes are more complicated, since HSDS expects to receive a packed buffer containing only the data for the fields that are actually being written to. H5Tconvert leaves blank spaces in the buffer, so it was necessary to create the packed buffer through H5Dgather and a new callback.

This depends on HDFGroup/hsds#298, which fixes some issues with writing to field selections.

@mattjala mattjala added the enhancement New feature or request label Jan 25, 2024
@mattjala mattjala force-pushed the cmpd_subset_conversion_pipeline branch from bb3f05e to 9979a64 Compare January 25, 2024 22:06
@mattjala mattjala marked this pull request as ready for review January 26, 2024 15:17
@mattjala mattjala force-pushed the cmpd_subset_conversion_pipeline branch from b67a1b0 to fc05d2e Compare March 21, 2024 18:10
"compound member names too long for URL");

/* Copy name to query string without null byte */
memcpy(cmpd_query_ptr, member_name, strlen(member_name));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this and the reference in the line below should be url_encoded_member_name rather than member_name.

/* If another member name will follow, add sepator */
if (j < num_cmpd_members - 1) {
*cmpd_query_ptr = COMPOUND_MEMBER_SEPARATOR;
cmpd_query_ptr++;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's likely worth adding another check for going past URL_MAX_LENGTH here before adding the separator and below before adding the NUL terminator just to be better assured that we aren't running off the buffer end.

@jhendersonHDF jhendersonHDF merged commit 6e2981a into HDFGroup:master Apr 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants