developmentseed / developmentseed/cql2-rs

Python cql2 to_sql uses generic dialect, breaking A_OVERLAPS for Postgres

Open
#249 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
23
Forks
3
Avg merge
5h 2m
Merged PRs (30d)
7

Description

The Python bindings only exposes `to_sql` which transforms to SQLs generic dialect. Uses with Postgres, this works almost, but at least A_OVERLAPS which translates to `@@` isn't correct (should be `&&` in Postgres).

I believe this isn't meant to support all dialects, probably something like exposing `to_sql_ast` would be the right way so users can build on top of that to derive their correct dialect SQL?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Python binding's to_sql entry point and the handling of A_OVERLAPS. Investigate whether exposing to_sql_ast gives callers enough information to derive PostgreSQL-compatible SQL, then verify that the generic output no longer prevents correct PostgreSQL use. Done means the Python API supports the required dialect-specific path without breaking existing generic SQL behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python, rust
Domain
api, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.