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

Incorrect cql2_query generation when using the in operator #122

Closed
mmcfarland opened this issue Jun 3, 2022 · 0 comments · Fixed by #124
Closed

Incorrect cql2_query generation when using the in operator #122

mmcfarland opened this issue Jun 3, 2022 · 0 comments · Fixed by #124
Labels
bug Something isn't working

Comments

@mmcfarland
Copy link
Collaborator

mmcfarland commented Jun 3, 2022

I believe recent changes to determine an appropriate wrapper fn for a property broke the functionality of in operators, where it does not property generate the jsonb object path of the property:

A cql2 filter input:

select pgstac.stac_search_to_where('{"filter-lang":"cql2-json","filter":{"op": "in", "args": [{"property": "platform"}, ["landsat-7", "landsat-8"]]}}');

Results in sql output of:

 platform = ANY ('{landsat-7,landsat-8}')

Instead of the expected output (likely should include wrappers, as well):

 'content'->'properties'->'platform' = ANY ('{landsat-7,landsat-8}')

Forcing a to_text wrapper value here resulted in the correct property accessor syntax, but obviously skips the queryables/numeric wrapper logic.

@mmcfarland mmcfarland added the bug Something isn't working label Jun 3, 2022
bitner added a commit that referenced this issue Jun 14, 2022
* fix for in and wrapper

* add neq operator

* add tests to fix for 122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant