You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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))...
The text was updated successfully, but these errors were encountered:
If you are interested in working on this issue, please go ahead and provide PR for that.
We'd be happy to review it and merge it.
If this is the first time you are contributing a Pull Request to Cube, please check our contribution guidelines.
You can also post any questions while contributing in the #contributors channel in the Cube Slack.
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:
VARCHAR
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:
The text was updated successfully, but these errors were encountered: