WIP to move the operator children out of a vector#17568
Closed
taniabogatsch wants to merge 5 commits intoduckdb:mainfrom
Closed
WIP to move the operator children out of a vector#17568taniabogatsch wants to merge 5 commits intoduckdb:mainfrom
taniabogatsch wants to merge 5 commits intoduckdb:mainfrom
Conversation
Contributor
Author
|
Will close this and eventually re-open a PR implementing 3. |
Mytherin
added a commit
that referenced
this pull request
Jun 12, 2025
Follow-up to #17568. Construct the `ArenaLinkedList` with an `ArenaAllocator` (via `Make` in the `PhysicalPlan`). Found a few more places where we used `uniq_ptr` instead of a reference for the `PhyscialOperator` (result collectors), so I also changed that code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed with @Mytherin and @Maxxen, here is a first draft on a possible solution to move the operator children out of a vector.
I don't think this is pretty enough yet to go with it. Initially, I wanted to make no changes to the operator constructors and planning functions. However, since some operators
push_backto their children in their constructors (instead of in the planning functions), I ended up passing the arena to those operators.I think moving forward, we have three options to finish up this PR, with varying levels of prettiness.
Intrusive linked list.
ArenaLinkedList.We do not store the arena in the
ArenaLinkedList. Instead ofpush_back(elem), we addAppend(arena, elem).Initsituation, which currently has to sometimes happen in the constructors ANDMake.ArenaLinkedListcan have nodes from multiple arenas.We explicitly construct the
ArenaLinkedList(ArenaAllocator &arena)inPhysicalOperator, instead of optionally initiliazing it.push_back.Let me know how to best move forward with this. :)