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

nc_def_var_filter() should say in docs that it will cause vars to be switched to chunking #1612

Closed
edwardhartnett opened this issue Jan 30, 2020 · 4 comments · Fixed by #1629

Comments

@edwardhartnett
Copy link
Contributor

Filters only work with chunked data.

nc_def_var_filter() needs to check that a var is chunked and return NC_EINVAL when an attempt is made to set a filter on a contiguous (or compact) variable.

I have a fix and will put a PR up shortly.

@edwardhartnett
Copy link
Contributor Author

OK, what actually happens is that the var is silently converted to chunked. This should be mentioned in the documentation for nc_def_var_filter().

@DennisHeimbigner
Copy link
Collaborator

I noticed that code. Perhaps it would be better to not
do the change to chunked and report the error.

@edwardhartnett
Copy link
Contributor Author

For all the built-in filters, we do the same - we silently convert the variable to chunked. This seems like it's working out, and I think it would be least confusing if the user-defined filters work the same way.

So I suggest we document this and leave it alone.

@DennisHeimbigner
Copy link
Collaborator

ok

@edwardhartnett edwardhartnett changed the title nc_def_var_filter() should return NC_EINVAL for contiguous and compact vars nc_def_var_filter() should say in docs that it will cause vars to be switched to chunking Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants