Open BugaM opened 1 week ago
Hi @BugaM -- if you are executing SQL queries via .sql
then the translation issue here is with SQLGlot, not with Ibis.
sqlglot
is what we use for handling dialect translation, and while we subclass some dialects to make tweaks, DuckDB has pretty robust support, so we currently don't do that.
This seems like an issue to open upstream at https://github.com/tobymao/sqlglot
Is your feature request related to a problem?
In DuckDB, the RANGE function requires a third argument (an interval) when working with timestamps. This differs from BigQuery’s implementation, where the RANGE function can take two timestamp arguments without an interval. This incompatibility prevents the following query, which works in BigQuery, from running in DuckDB.
Error:
The same query works in BigQuery:
Resulting:
What is the motivation behind your request?
I’m using Ibis to test BigQuery queries locally. This feature is needed to make sure BigQuery operators work the same way in Ibis. Specifically, it would support doing as of joins as suggested by the documentation. Enabling it also envolves adding the
RANGE_CONTAINS
function.Describe the solution you'd like
Add support to BQ's RANGE and RANGE_CONTAINS functions when BigQuery dialect is chosen.
What version of ibis are you running?
9.5.0
What backend(s) are you using, if any?
DuckDB, BigQuery
Code of Conduct