Skip to content

tp: order tree rows for streaming folds - #7214

Draft
LalitMaganti wants to merge 1 commit into
dev/lalitm/exec-tree-number-nodesfrom
dev/lalitm/exec-tree-order
Draft

tp: order tree rows for streaming folds#7214
LalitMaganti wants to merge 1 commit into
dev/lalitm/exec-tree-number-nodesfrom
dev/lalitm/exec-tree-order

Conversation

@LalitMaganti

@LalitMaganti LalitMaganti commented Aug 25, 2026

Copy link
Copy Markdown
Member

Folding toward the root needs children before parents. Folding away from the
root needs the opposite order. Neither order should be imposed on every
source.

TreeOrder takes the order known by the planner and produces the one requested
by the fold. It passes matching input through, reverses the opposite order,
and topologically sorts rows when no useful order is known.

The operator reports an incorrect declared order, a parent missing from the
input, or a cycle. It only stores rows when reordering requires it.

@LalitMaganti LalitMaganti changed the title tp: stream trees in parent or child order tp: order tree rows for streaming folds Aug 25, 2026
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-number-nodes branch from a8cbdaa to 90f2c16 Compare August 25, 2026 14:59
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-order branch 2 times, most recently from af2c641 to de35bf5 Compare August 25, 2026 16:50
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-number-nodes branch from 1287f35 to 502083b Compare August 26, 2026 16:44
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-order branch from de35bf5 to e416782 Compare August 26, 2026 16:44
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-number-nodes branch from 502083b to 3c03736 Compare August 26, 2026 17:05
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-order branch from e416782 to c443d73 Compare August 26, 2026 17:05
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-number-nodes branch from 3c03736 to bef6e17 Compare August 26, 2026 17:13
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-order branch from c443d73 to dd4e893 Compare August 26, 2026 17:13
Folding toward the root needs children before parents. Folding away from the
root needs the opposite order. Neither order should be imposed on every
source.

TreeOrder takes the order known by the planner and produces the one requested
by the fold. It passes matching input through, reverses the opposite order,
and topologically sorts rows when no useful order is known.

The operator reports an incorrect declared order, a parent missing from the
input, or a cycle. It only stores rows when reordering requires it.
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-number-nodes branch from bef6e17 to ba601d3 Compare August 26, 2026 17:39
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-tree-order branch from dd4e893 to 9546d09 Compare August 26, 2026 17:39
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.

1 participant