Open
Description
What happened?
In the BigQuery backend, when an empty window spec is applied, the generated SQL contains a syntax error. This leads to query failures and prevents the expected computation.
Step to reproduce
- Code:
bq = ibis.bigquery.connect(project_id="bigframes-dev")
t = bq.table("ibis_gbq_testing.functional_alltypes")
ibis.to_sql(t.int_col.quantile(0.5).over(ibis.window()), dialect="bigquery")
- Generated SQL (with error)
SELECT
PERCENTILE_CONT(`t0`.`int_col`, 0.5) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS `Quantile_int_col_0_5`
FROM `bigframes-dev`.`ibis_gbq_testing`.`functional_alltypes` AS `t0`
- Error Message:
Window framing clause is not allowed for analytic function percentile_cont at [2:46]
Expected Behavior
The generated SQL could omit the window framing clause when an empty window spec is provided.
SELECT
PERCENTILE_CONT(`t0`.`int_col`, 0.5) OVER () AS `Quantile_int_col_0_5`
FROM `bigframes-dev`.`ibis_gbq_testing`.`functional_alltypes` AS `t0`
What version of ibis are you using?
9.2.0
What backend(s) are you using, if any?
BigQuery
Relevant log output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
backlog