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

Explicitly suppress variable length type compression #2730

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

DennisHeimbigner
Copy link
Collaborator

@DennisHeimbigner DennisHeimbigner commented Aug 3, 2023

re: PR #2716).

The basic change is to make use of the fact that HDF5 automatically suppresses optional filters when an attempt is made to apply them to variable-length typed arrays. This means that e.g. ncdump or nccopy will properly see meaningful data. Note that if a filter is defined as HDF5 mandatory, then the corresponding variable will be suppressed and will be invisible to ncdump and nccopy. This functionality is also propagated to NCZarr.

This PR makes some minor changes to PR #2716 as follows:

  • Move the test for filter X variable-length from dfilter.c down into the dispatch table functions.
  • Make all filters for HDF5 optional rather than mandatory so that the built-in HDF5 test for filter X variable-length will be invoked.

The test case for this was expanded to verify that the filters are defined, but suppressed.

re: PR Unidata#2716).
re: Issue Unidata#2189

The basic change is to make use of the fact that HDF5 automatically suppresses optional filters when an attempt is made to apply them to variable-length typed arrays.
This means that e.g. ncdump or nccopy will properly see meaningful data.
Note that if a filter is defined as HDF5 mandatory, then the corresponding variable will be suppressed and will be invisible to ncdump and nccopy.
This functionality is also propagated to NCZarr.

This PR makes some minor changes to PR Unidata#2716 as follows:
* Move the test for filter X variable-length from dfilter.c down into the dispatch table functions.
* Make all filters for HDF5 optional rather than mandatory so that the built-in HDF5 test for filter X variable-length will be invoked.

The test case for this was expanded to verify that the filters are defined, but suppressed.
@DennisHeimbigner DennisHeimbigner requested a review from WardF as a code owner August 3, 2023 21:48
@WardF
Copy link
Member

WardF commented Aug 4, 2023

Is this in line with netCDF Java? I've spent all day on #2721 and will try to review this asap. Thanks Dennis!

@DennisHeimbigner
Copy link
Collaborator Author

Is this in line with netCDF Java?

Good question; I do not know.

@WardF
Copy link
Member

WardF commented Aug 10, 2023

@haileyajohnson can you weigh in on if this proposed change is in line with netCDF-Java?

@haileyajohnson
Copy link

Honestly this is the first I've ever thought of what happens with a filter on a vlen array. I think the proposed changes are a reasonable way to handle it though and I could make sure java does the same.

@WardF
Copy link
Member

WardF commented Aug 10, 2023

Still establishing a box around #2721 but this looks good, thanks @haileyajohnson! Since it's reasonable for netCDF-Java (or at least isn't going to introduce an irreconcilable difference) , I'll get this merged.

@WardF WardF merged commit c798bb6 into Unidata:main Aug 10, 2023
@DennisHeimbigner DennisHeimbigner deleted the filtervlen2.dmh branch September 27, 2023 19:01
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.

netcdf built with hdf5 1.10.8 error after 'nc_def_var_fletcher32'
3 participants