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_
expression - Retain only query children actually referenced by one scalar expression.
- prune_
query - Drop unreferenced query children and remap local query expressions, including canonical window definitions.
- 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.