Files
turso/core/incremental
Glauber Costa 92751e621b Add DISTINCT support to aggregate operator
Implements COUNT/SUM/AVG(DISTINCT) and SELECT DISTINCT for materialized views.
To do this we have to keep a list of the actual distinct values
(similarly to how we do for min/max). We then update the operator (and
issue deltas) only when there is a state transition (for example, if we
already count the value x = 1, and we see an insert for x = 1, we do
nothing).

SELECT DISTINCT (with no aggregator) is similar. We already have to keep
a list of the values anyway to power the aggregates. So we just issue
new deltas based on the transition, without updating the aggregator.
2025-10-22 16:32:18 -05:00
..
2025-09-25 22:52:08 -03:00
2025-09-21 21:00:27 -03:00
2025-10-16 11:26:50 +03:00