Skip to content

Conversation

Kimahriman
Copy link
Contributor

What changes were proposed in this pull request?

Adds subexpression elimination support to higher order functions. Subexpressions are calculated on lambda functions and evaluated at the start of each iteration of the loop for each function.

Why are the changes needed?

Lack of subexpression elimination inside higher order functions can lead to significant and unexpected performance issues in complex queries and ETL jobs.

Does this PR introduce any user-facing change?

No, just a performance improvement.

How was this patch tested?

New UTs

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Jun 24, 2025
@Kimahriman Kimahriman force-pushed the hof-subexpr-elimination-local branch from b36eb26 to edf2f17 Compare June 24, 2025 15:49
@Kimahriman
Copy link
Contributor Author

This builds on top of two other PRs which would be great to get some momentum on:

The changes required on top of those to actually implement the subexpression elimination in higher order functions is just in the last commit

@Kimahriman Kimahriman force-pushed the hof-subexpr-elimination-local branch from ebba29d to 02c661f Compare June 24, 2025 16:16
@Kimahriman Kimahriman force-pushed the hof-subexpr-elimination-local branch from 02c661f to 8aeb23f Compare June 24, 2025 20:23
Copy link

github-actions bot commented Oct 3, 2025

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Oct 3, 2025
@github-actions github-actions bot closed this Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant