stac-utils / stac-utils/rustac-py
DuckDB queries into structures aren't escaped correctly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 54
- Forks
- 5
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
I'm trying to find all the items that contain a specific variable name, like "hurs".
The item with the "hurs" variable looks like this:
and I know that WHERE "cube:variables".hurs IS NOT NULL works.
But what should the filter argument for rustac look like?
cql_json_filter = {
"op": "is_not_null",
"args": [
{"property": "cube:variables.hurs"}
]
}
items = await rustac.search('stac_items.parquet', filter=cql_json_filter)
doesn't error, but doesn't return my item either.
I pretty sure this is some simple user syntax error, here, right?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the rustac.search filter handling for stac_items.parquet and trace how the CQL JSON property cube:variables.hurs is passed to the DuckDB query. Check the existing filter-related tests or add a focused case for a non-null nested structure property. Done means the query returns the item containing hurs without breaking other structure filters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100