-
Notifications
You must be signed in to change notification settings - Fork 8
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
Compound subsetting through H5Tconvert and field selection #118
Conversation
bb3f05e
to
9979a64
Compare
b67a1b0
to
fc05d2e
Compare
src/rest_vol_dataset.c
Outdated
"compound member names too long for URL"); | ||
|
||
/* Copy name to query string without null byte */ | ||
memcpy(cmpd_query_ptr, member_name, strlen(member_name)); |
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.
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++; |
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.
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.
Alternative implementation of #107. Compound reads are handled through
H5Tconvert
. The previous issue with this - thatH5Tconvert
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 throughH5Dgather
and a new callback.This depends on HDFGroup/hsds#298, which fixes some issues with writing to field selections.