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

Add a generic function compiler to handle IGNORE NULLS in window functions #429

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

laserkaplan
Copy link
Member

@laserkaplan laserkaplan commented Dec 6, 2023

Description

Adds a simple compiler method for using the IGNORE NULLS functionality of window functions in Trino. I implemented this privately in a package for work but figured I could generalize it and add it to the package as a whole :)

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Dec 6, 2023
@hovaesco
Copy link
Member

Please squash commits and rebase on master.

@laserkaplan laserkaplan force-pushed the ignore-nulls branch 3 times, most recently from 4312668 to 1ba5e43 Compare December 27, 2023 15:12
@laserkaplan
Copy link
Member Author

Please squash commits and rebase on master.

Took a couple of tries but done now :P

Add a generic function compiler to handle IGNORE NULLS in window
functions.
@hashhar
Copy link
Member

hashhar commented Jan 18, 2024

just reworded the commit message for release note's sake. Merging.

@hashhar hashhar merged commit b5225e5 into trinodb:master Jan 18, 2024
12 checks passed
evansd added a commit to opensafely-core/ehrql that referenced this pull request Feb 27, 2024
This doesn't benefit us at all (it's designed to avoid the compilation
overhead when executing the same SQL over and over) and it leads to
warnings when we execute clause elements whose caching behaviour has not
be explicitly defined.

We're getting a warning here now because we've just updated to Trino
v0.328.0 which includes this PR:
 * trinodb/trino-python-client#429

This defines a compiler for the `Lag` clause which (because it is not
restricted to a specific dialect) ends up being used by SQLite and
triggering the warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants