Skip to content
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

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

jvanstraten
Copy link
Contributor

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.

@jvanstraten
Copy link
Contributor Author

jvanstraten commented Jun 22, 2022

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.

proto/substrait/algebra.proto Outdated Show resolved Hide resolved
proto/substrait/algebra.proto Outdated Show resolved Hide resolved
proto/substrait/algebra.proto Outdated Show resolved Hide resolved
proto/substrait/algebra.proto Show resolved Hide resolved
proto/substrait/algebra.proto Outdated Show resolved Hide resolved
proto/substrait/algebra.proto Outdated Show resolved Hide resolved
proto/substrait/algebra.proto Outdated Show resolved Hide resolved
proto/substrait/algebra.proto Outdated Show resolved Hide resolved
proto/substrait/algebra.proto Show resolved Hide resolved
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.
// 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?).
Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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 😅

@jvanstraten jvanstraten requested a review from jacques-n July 6, 2022 16:07
Copy link
Contributor

@jacques-n jacques-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @jvanstraten !

@jacques-n jacques-n merged commit d4cfbe0 into substrait-io:main Jul 26, 2022
@jvanstraten jvanstraten deleted the function-docs branch July 26, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants