Skip to content

Fix SQL translation for lag() and lead() #45

Open
alistaire47 wants to merge 1 commit intohrbrmstr:masterfrom
alistaire47:bugfix/lag-lead-translation
Open

Fix SQL translation for lag() and lead() #45
alistaire47 wants to merge 1 commit intohrbrmstr:masterfrom
alistaire47:bugfix/lag-lead-translation

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