Expand description
Byte-bounded streaming physical DISTINCT operator.
The operator keeps exact encoded keys in memory until their combined byte
size reaches work_mem. It then migrates every key to a temporary,
bucketed on-disk set. Disk probes compare the complete encoded key, so a
hash collision can never turn a new row into a duplicate. Output remains
streaming and preserves the first row for every key in child order.
Structs§
- Canonical
RowHash Set - Collision-safe in-memory set for positional SQL rows.
- Distinct
- Stable SQL duplicate elimination.
- Exact
RowSet - Exact, byte-bounded row-key set that can outlive one physical operator.
Constants§
- DEFAULT_
DISTINCT_ WORK_ MEM_ BYTES - Default used by compatibility constructors. Engine callers should pass the
current session’s
work_memthroughDistinct::all_with_work_memorDistinct::on_with_work_mem.
Functions§
- canonical_
row_ key - Encode positional SQL values in the exact equality domain used by DISTINCT and spill-backed row-key state. Callers that need an external exact index can persist this representation without relying on
Value’s serialization format. - hash_
canonical_ row - Hash a borrowed positional SQL row in its canonical equality domain.
- try_
pack_ compact_ text_ pair - Pack exactly two text-or-NULL values of at most three bytes each into an injective integer key.
Noneselects the general collision-safe encoder for every other row.