-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugLEGACY. Use the Bug issue type insteadLEGACY. Use the Bug issue type insteaddriver:duckdbhelp wantedCommunity contributions are welcome.Community contributions are welcome.
Description
Describe the bug
For a filter on a numeric member, the generated SQL for DuckDB would contain the filter value as VARCHAR. That would not be correct SQL for DuckDB, and it would not run.
For other dialects, Cube is able to cast numeric filter values to correct numeric types.
To Reproduce
Steps to reproduce the behavior:
- Use DuckDB, build a query with a filter on a numeric member
- Run it, it will fail
- Check the generated SQL, it will contain the filter value as
VARCHAR
Error: Binder Error: Cannot compare values of type BIGINT and type VARCHAR - an explicit cast is required
...WHERE ("base_orders__count" >= ?)...
Expected behavior
Cube generates SQL where the filter value is cast to a proper numeric type.
Version:
v1.2.0
Additional context
Compare to SQ generated for BigQuery and Athena:
...WHERE ("base_orders__count" >= CAST(? AS FLOAT64))...
...WHERE ("base_orders__count" >= CAST(? AS DOUBLE))...
juniusfree, jedymatt, rmyamashi, marijoy-apa, reyjoshuamacarat and 2 more
Metadata
Metadata
Assignees
Labels
bugLEGACY. Use the Bug issue type insteadLEGACY. Use the Bug issue type insteaddriver:duckdbhelp wantedCommunity contributions are welcome.Community contributions are welcome.