Data UI Backlog

Hybrid measure sort on base types

Sort a CRUD / hybrid list by a Phase B measure (e.g. click Average on Model Bank :models). Not in MVP (Issue 12).

MVP: hybrids stay id-first Phase A + Phase B. :average-rating is visible and not sortable. 09 relaxes :sortable t without :column t for rollups only. :hot-models is last-30-days activity, not this list.

When this lands:

Traps (do not close this door in 08b/09):

  1. Do not globalize 09's :column t relaxation. Hybrid :sortable t on :average-rating is a compile error until this item.
  2. 08b's mapper returns the raw SQL agg. Rollup SELECT wraps COALESCE for :sum / :list / :distinct. This ORDER BY uses the raw form plus NULLS LAST. Do not bake rollup zero-fact display into the mapping (ranking 0 while stars show empty).
  3. The subquery reads the fact table directly. Do not replay the hybrid's view join (:models joins images and ratings; Lisp :avg can double-count). Display fan-out is Issue 16's cousin, not a sort input.
  4. No write-time denormalized average_rating column. The compiler stays authoritative.
  5. Do not Lisp-sort the whole table "for now." Do not treat a rollup as the sortable stand-in for the CRUD type.

Depends on 08b's mapper being callable without assuming GROUP BY.

Slot
16100
Status
10 Open
Tags
backend, compiler
Contributors
Donnie