Skip to content

Conversation

@dcoutts
Copy link
Collaborator

@dcoutts dcoutts commented Feb 24, 2025

Implement the top level part of the union and unions API.

Construct the new result table, as an empty table except for a union level merging tree, which is the pending union of the pending merges of all existing runs and merges in each input table.

We don't enable the state machine tests yet because lookups are not done yet.

@dcoutts dcoutts force-pushed the dcoutts/table-union branch from 1aa5566 to 698a6ef Compare February 26, 2025 12:40
@dcoutts
Copy link
Collaborator Author

dcoutts commented Feb 26, 2025

I've extracted some of the independent bits here into #594, #595 and #596

@dcoutts dcoutts force-pushed the dcoutts/table-union branch from 698a6ef to 3eddb7a Compare February 26, 2025 17:00
@dcoutts dcoutts changed the title Table union Table union top level construction Feb 26, 2025
@dcoutts dcoutts marked this pull request as ready for review February 26, 2025 17:03
@dcoutts
Copy link
Collaborator Author

dcoutts commented Feb 26, 2025

This isn't perfect yet, but it's good enough for a first review. The first three commits can be ignored. They're posted as separate small PRs (#594, #595 and #596).

@dcoutts dcoutts force-pushed the dcoutts/table-union branch from 1ee31bb to fa13687 Compare March 3, 2025 17:00
@dcoutts
Copy link
Collaborator Author

dcoutts commented Mar 3, 2025

Rebased on main, reordered and squashed some patches. Ready for review.

@dcoutts dcoutts force-pushed the dcoutts/table-union branch from fa13687 to bbef5d0 Compare March 3, 2025 22:38
Copy link
Collaborator

@mheinzel mheinzel left a comment

Choose a reason for hiding this comment

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

Just two things to look at, but looks good otherwise.

dcoutts added 4 commits March 5, 2025 09:36
We have to update the ParentTable when we have union/unions operations.
These are sub-optimal since we only track a single parent, and union(s)
create new tables with multiple parents.
The config of the resulting table is actually independent from the
config of the input tables, so we do not need them to match. So we take
the config from the first input table.
We were getting some thunks in the lists which was a bit awkward to sort
out. Easier to make them vectors. Using lists vs vectors in the first
place didn't have any strong argument either way.
We'll reuse it in the next patch.
@dcoutts dcoutts force-pushed the dcoutts/table-union branch from bbef5d0 to ff67e82 Compare March 5, 2025 10:40
@dcoutts
Copy link
Collaborator Author

dcoutts commented Mar 5, 2025

@jorisdral @mheinzel thanks for the PR review. I've pushed a patch with all the changes. If you're happy I'll squash it in.

@dcoutts dcoutts requested review from jorisdral and mheinzel March 5, 2025 10:41
dcoutts added 2 commits March 5, 2025 11:53
The API modules all implement union in terms of unions themselves.
@dcoutts dcoutts force-pushed the dcoutts/table-union branch from ff67e82 to c98fea8 Compare March 5, 2025 11:53
We rely on doing interruptable operations that could receive async
exceptions _before_ doing operations that allocate fresh resources.
@dcoutts dcoutts force-pushed the dcoutts/table-union branch from c98fea8 to 19bf835 Compare March 5, 2025 11:55
@dcoutts dcoutts enabled auto-merge March 5, 2025 12:05
@dcoutts dcoutts added this pull request to the merge queue Mar 5, 2025
Merged via the queue into main with commit fd3cbec Mar 5, 2025
27 checks passed
@dcoutts dcoutts deleted the dcoutts/table-union branch March 5, 2025 12:54
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.

4 participants