-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: specify how function arguments are to be bound #231
Conversation
This isn't really done yet, but I'd like some review on it before I complete it: I tried to document all the function fields while I was at it, but I don't understand all of them thoroughly enough (marked with TODOs). I also reordered them to follow the order in which they are specified on the website (for window and aggregate functions). The website doesn't actually describe how to bind scalar functions at all (it only describes the definitions), so it should probably get an obvious section on this as well. |
BREAKING CHANGE: function argument bindings were open to interpretation before, and were often produced incorrectly; therefore, this change semantically shifts some responsibilities from the consumers to the producers.
870be48
to
a7d4e09
Compare
// Defines the record relative to the current record from which the window | ||
// extends. The bound is inclusive. If the lower bound indexes a record | ||
// greater than the upper bound, TODO (null range/no records passed? | ||
// wrapping around as if lower/upper were swapped? error? null?). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what about this? @jacques-n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this on review, sorry. I don't remember the rules offhand. Can you audit a couple of databases to see how they specify behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would, but I currently don't even know how to specify a window function in SQL, let alone try multiple databases 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @jvanstraten !
BREAKING CHANGE: function argument bindings were open to interpretation before, and were often produced incorrectly; therefore, this change semantically shifts some responsibilities from the consumers to the producers.