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 SQL translation for lag() and lead() #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alistaire47
Copy link
Contributor

Hi!

Just a quick PR so Drill doesn't error out when using lead() or lag() with dbplyr SQL translation. Before this, the value for default (NA by default) would get passed in as a third argument (e.g. LAG(variable1, 1, NA)) which causes Drill to throw an error that refers users to this Jira ticket.

This implementation does pass through the value for n, which is 1L by default. Drill doesn't currently support any other value besides 1, but this implementation works and will be forwards-compatible if the limitation gets lifted in the future.

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.

1 participant