Skip to content

Incorrect cql2_query generation when using the in operator #122

@mmcfarland

Description

@mmcfarland

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions