Skip to content

[SQL] If an operator has multiple RetainKey successors, combine them …#5866

Open
mihaibudiu wants to merge 1 commit intomainfrom
issue5811
Open

[SQL] If an operator has multiple RetainKey successors, combine them …#5866
mihaibudiu wants to merge 1 commit intomainfrom
issue5811

Conversation

@mihaibudiu
Copy link
Contributor

…using MIN. This is currently only used for self-joins, but if it works well, we may enable it for other cases in the future

Fixes #5811

This is an interesting one. It's a feature we've been missing for a while: supporting multiple GC operators on the same integral.
Due to other features of the compiler, this could only happen for self-joins, and this is the case handled here. But there will be other useful applications.

This needs some infra to better test programs with GC.

…using MIN. This is currently only used for self-joins, but if it works well, we may enable it for other cases in the future

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Copy link
Collaborator

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Fixes the self-join GC merging gap that came up in the PR #5832 discussion. The find-then-rewrite pattern is clean, the test is well-constructed (checks both functional correctness and the GC count), and extracting createApplyN/combineMin/min as statics is a good cleanup.

Soft note: the commit subject line is ~100 chars and GitHub shows it truncated with "…". Worth squashing to ≤72 chars before merge — the full text is in the body anyway.

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.

[SQL] Self-join on table fails with compile error: "Operator MapIndex has two RetainKeys policies"

2 participants