You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Feature] Sparse Delta Column Group (SDCG) for lake PK column-mode partial update
Adds an experimental, DEFAULT-OFF sparse overlay format for shared-data (lake)
primary-key column-mode partial updates, plus an adaptive write-mode selector.
What it adds (all opt-in; zero behavior change at default config):
- Sparse `.spcols` delta column group: a partial update writes only the K updated
cells (source_rowid + values) instead of a row-complete dense `.cols`, cutting
write amplification for wide/low-coverage updates on large segments. Gated by
`enable_sparse_dcg` (default false).
- partial_update_mode=auto: a per-load + per-segment cost model that picks the
cheapest write mode (row / dense / sparse; packed / masked-dense for flexible)
from update width, coverage, segment size and a per-table read-amp budget.
Opt-in per load; default mode stays `row`.
- Flexible (per-row heterogeneous column sets) partial update via a hidden
`__cset__` slot; packed sparse + masked-dense emit paths.
- Read path: LayeredOverlayColumnIterator merges sparse overlays on read with
per-column presence gating; sound zone-map pruning for overlay columns.
- Background convergence: DCG-depth-aware lake PK compaction folds sparse chains;
compaction-conflict replay (incl. racing-DELETE reconciliation) preserves
overlays raced by a compaction. Gated by
`enable_sdcg_compaction_conflict_replay` (default false).
- Observability: sdcg_write_mode_* and sdcg_compaction_conflict_* metrics.
Safety: inert at default config. `enable_sparse_dcg`,
`enable_sdcg_compaction_conflict_replay`, and `sdcg_enable_per_column_zone_map`
all default false; `partial_update_mode` defaults to `row`. With defaults, no
new code path executes and dense/row behavior is byte-identical. All proto
changes are additive (optional/repeated, no reused ordinals). FE flexible/auto
planning is reached only when the user opts into the corresponding mode.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NrM3YZ3WD5d7UPxp7D8tTd
Signed-off-by: meegoo <meegoo.sr@gmail.com>
0 commit comments