Expand description
Compact scalar-subquery arenas after expression rewrites discard inputs.
Functions§
- prune_
command - Drop unreferenced query children and remap local command expressions without evaluating them.
- prune_
command_ with_ control - Compact one command’s scalar-query arena in place. Failure before commit preserves the command; the commit neither allocates nor invokes fallible callbacks.
- prune_
expression - Retain only query children actually referenced by one scalar expression.
- prune_
expression_ with_ control - Compact one scalar expression’s arena without evaluating its expressions or cloning its retained children.
- prune_
query - Drop unreferenced query children and remap local query expressions, including canonical window definitions.
- prune_
query_ with_ control - Compact only this query’s arena, preserving child-query namespaces and canonical window inputs. Admission and cancellation finish before the allocation-free commit.
- transfer_
expression - Transfer each referenced query once and compact the source indices. The expression must already be detached from the source block. Shared or invalid references decline atomically; nested query arenas are never remapped. The caller owns the legality of changing evaluation scope.