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

refactor(sql): simplify FirstValue/LastValue usage #8568

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

jcrist
Copy link
Member

@jcrist jcrist commented Mar 6, 2024

During recent refactors the FirstValue/LastValue have been pretty much removed from the codebase - at this point they only exist since some backends require spelling first/last as first_value/last_value when used in a window function context (other backends alias first/last to these for nicer SQL UX).

This PR:

  • Moves FirstValue/LastValue to ibis/backends/sql/rewrites.py to treat them as SQL-specific IR.
  • Refactors the First -> FirstValue/Last -> LastValue window function rewrites to always apply for all SQL backends, making our compilation more uniform here.

@jcrist jcrist force-pushed the refactor-first-last-value branch from cf29fad to 01e2ec9 Compare March 6, 2024 18:11
@kszucs kszucs changed the title refactor: simplify FirstValue/LastValue usage refactor(sql): simplify FirstValue/LastValue usage Mar 6, 2024
@kszucs kszucs merged commit 6ed2e39 into ibis-project:main Mar 6, 2024
75 checks passed
@jcrist jcrist deleted the refactor-first-last-value branch March 6, 2024 19:07
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.

3 participants