tp: assign dense tree node numbers - #7213
Open
LalitMaganti wants to merge 1 commit into
Open
Conversation
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
August 25, 2026 14:59
a8cbdaa to
90f2c16
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
August 25, 2026 16:50
90f2c16 to
1287f35
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
August 26, 2026 16:44
1287f35 to
502083b
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
August 26, 2026 17:05
502083b to
3c03736
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
August 26, 2026 17:13
3c03736 to
bef6e17
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
August 26, 2026 17:39
bef6e17 to
ba601d3
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
2 times, most recently
from
September 2, 2026 23:56
ce1a1d6 to
63f9459
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
2 times, most recently
from
September 3, 2026 10:10
456ac69 to
e602268
Compare
LalitMaganti
marked this pull request as ready for review
September 3, 2026 10:17
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
September 3, 2026 10:22
e602268 to
1fc64d1
Compare
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
from
September 3, 2026 11:03
1fc64d1 to
8802921
Compare
Tree IDs can be sparse, strings, or row IDs from a table much larger than the query result. Arrays indexed by those IDs would scale with the ID range rather than the tree being processed. TreeNumberNodes assigns stable dense numbers as rows arrive and appends the numbered node and parent columns to each batch. A parent is numbered when first referenced, so child-first input works even when the parent row appears later. The original columns stay in the batch. Later tree operators get compact indices without losing the values needed in the result.
LalitMaganti
force-pushed
the
dev/lalitm/exec-tree-number-nodes
branch
2 times, most recently
from
September 3, 2026 11:04
8802921 to
ffad8df
Compare
sashwinbalaji
approved these changes
Sep 4, 2026
| private: | ||
| struct Key { | ||
| int64_t value; | ||
| bool string; |
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.
Tree IDs can be sparse, strings, or row IDs from a table much larger than the
query result. Arrays indexed by those IDs would scale with the ID range rather
than the tree being processed.
TreeNumberNodes assigns stable dense numbers as rows arrive and appends the
numbered node and parent columns to each batch. A parent is numbered when first
referenced, so child-first input works even when the parent row appears later.
The original columns stay in the batch. Later tree operators get compact
indices without losing the values needed in the result.