Repository navigation
PostgreSQL, SQLite: Keep untyped string window frame offsets untyped - #2781
Open
LucaCappelletti94 wants to merge 3 commits into
Open
LucaCappelletti94 wants to merge 3 commits into
LucaCappelletti94 wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2781 +/- ##
==========================================
+ Coverage 82.87% 82.88% +0.01%
==========================================
Files 42 42
Lines 35968 35966 -2
Branches 35968 35966 -2
==========================================
+ Hits 29807 29810 +3
+ Misses 2654 2653 -1
+ Partials 3507 3503 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
window-frame-untyped-offset
branch
from
October 31, 2026 18:59
fce98d0 to
52d27f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SELECT sum(x) OVER (ORDER BY f RANGE BETWEEN 'inf' PRECEDING AND '1 day' FOLLOWING) FROM trendered withINTERVAL 'inf' PRECEDING AND INTERVAL '1 day' FOLLOWINGin every dialect withoutrequire_interval_qualifier. PostgreSQL and SQLite take the type of an untyped offset from theORDER BYcolumn, so the addedINTERVALchanges the statement.The frame offset is now parsed with
parse_expr, dropping the string special case added in #655.INTERVAL '1' DAY PRECEDINGstill parses as an interval. In the dialects that require an interval qualifier,'1' PRECEDINGused to fail and now parses as a string, and'1' DAY PRECEDINGwithoutINTERVALnow fails.https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS and https://www.sqlite.org/windowfunctions.html#frame_boundaries
Yet another PR that has more PR text than code.