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

Fix handling of empty node lists #44

Merged
merged 1 commit into from
Dec 29, 2023
Merged

Fix handling of empty node lists #44

merged 1 commit into from
Dec 29, 2023

Conversation

jg-rp
Copy link
Owner

@jg-rp jg-rp commented Dec 28, 2023

This PR fixes handling of relative (@..) and root ($..) queries when used as arguments to filter functions. Previously, when those queries resulted in an empty node list, we were converting that node list to an empty regular list before passing it to functions that accept ValueType arguments. Now, in such cases, we convert empty node lists to the special result Nothing, which is required by the spec and is necessary for correct length() semantics.

We also update the CTS submodule, which now covers this case. See jsonpath-compliance-test-suite #53.

@jg-rp jg-rp merged commit 5ac48c4 into main Dec 29, 2023
40 checks passed
@jg-rp jg-rp deleted the empty-node-lists branch December 29, 2023 06:57
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.

1 participant