res-sheets Phase 4g: array/spill (deferred design) #7
Labels
No labels
harness
proj-core-console
proj-core-demo
proj-core-edit
proj-core-init
proj-core-lib
proj-core-login
proj-core-res
proj-core-sh
proj-core-theme
proj-docs
proj-extra-calc
proj-extra-code
proj-extra-playbook
proj-extra-sheets
proj-harness
proj-os
residual
tier-0-trivial
tier-1-easy
tier-2-medium
tier-3-hard
tier-4-major
tier-5-epic
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
residual/.agent#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan: res-sheets Phase 4g — Array/Spill Functions (design-only)
Goal
Design how
UNIQUE,SORT,FILTER,SEQUENCE, andTRANSPOSEcan return 2D result blocks that spill into neighboring cells. Implementation is deferred until after Phases 4a–4f are complete.Why this is a separate epic
The current
Valuetype is a scalar (Number,Text,Bool,Error,Empty). Array functions produce rectangular results. Supporting them requires either:ValueKindfor arrays plus spill logic inrecalc.goand the TUI renderer, orEither path touches the storage model, dependency graph, and UI rendering.
Affected areas (to be designed)
extra/lib/sheets/formula_value.go— array Value representation.extra/lib/sheets/recalc.go— how a spilled cell writes into neighbors.extra/lib/sheets/tui/view.go— rendering spilled values without overwriting real cell content.extra/lib/sheets/cell.go— possibly aSpillfield onCell.Candidate functions
UNIQUE(range)— remove duplicate rows.SORT(range, [sort_index], [sort_order])— sort by column.FILTER(range, include_range, [if_empty])— include rows where condition is true.SEQUENCE(rows, [columns], [start], [step])— generate numeric grid.TRANSPOSE(range)— swap rows/columns.Open design questions
UNIQUE/SORTcompare mixed text/number values?Next step
Do not implement. Revisit after Phases 4a–4f and Phase 5 are complete.