Skip to content

Conversation

ShawnStrasser
Copy link
Contributor

Description of changes

Removes an overly restrictive check in the Snowflake SQL compiler that prevented expressions from being used in window bounds.

Snowflake added support for expressions in window bounds in August 2024 (release notes), but Ibis was still raising OperationNotDefinedError when trying to use interval expressions like ibis.interval(seconds=10).

Before: OperationNotDefinedError: Expressions in window bounds are not supported by Snowflake

After: Generates correct SQL like RANGE BETWEEN INTERVAL '10 SECOND' preceding AND INTERVAL '0 SECOND' following

The fix removes the restriction and lets the base class handle window boundary processing, matching the behavior of other SQL backends.

Issues closed

N/A - This addresses a compatibility issue with current Snowflake.

@github-actions github-actions bot added the sql Backends that generate SQL label Sep 16, 2025
@cpcloud
Copy link
Member

cpcloud commented Oct 13, 2025

Confirmed this fixes expression bounds, and enables the corresponding test to now pass:

16 workers [2067 items]
..x........x..........................s....................................s...........x...........x..x..x...x.`........x.............x...s...x..xx....xx...x.x.x..xx.xxxxx..xx.xxxx....x..x..x [  9%]
.x.....x....xx.x.x..x...xxxx..x..x..xxx.x...x.xxx.xx.x..xxxxxx..xxxxxxxxx....x.x............................x....x.............x.....x....................x....x........x.........x..x........ [ 18%]
..x......x.....x...x..........................x....x......................x...x...........................x.....x.................x...x.................x...x.x.........x..x.......x.xx..X.... [ 27%]
...x..xx...x...x.x....x..x................x..............x...x..xx.......x.....x.........x..x...xx.xx...x...xxx.x...........................................................................x. [ 36%]
..x.....x..........x..........x.............x...............x.................xx......................x..................................x.............s........xxxxxxxxx..xx........x.......x [ 45%]
..xx.................x.xx..............x..x.....x.................x.......x................x....................x......x.x..........................x..................x..........s........... [ 55%]
.........x....xx........................................................x.......x......x.x...................x...........x..x.....x........................x...............x.................. [ 64%]
...........x.............................................x...xx...............................................................xx............x.......x..........................x...........x.. [ 73%]
..........x.............x.x.....xx........x.x.....x.....x.x.........x.x..x.........x......x.x...............x....................x...x..x..............x...........x.......................... [ 82%]
.x.................x...............................s.......................................................................................................................................... [ 91%]
...................................s.......s..................................................................s.....s..................................................                        [100%]
================================================================ 1840 passed, 10 skipped, 216 xfailed, 1 xpassed in 574.70s (0:09:34) ================================================================

@cpcloud cpcloud merged commit f859fa3 into ibis-project:main Oct 13, 2025
106 of 107 checks passed
@github-actions github-actions bot added the tests Issues or PRs related to tests label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sql Backends that generate SQL tests Issues or PRs related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants