This phase added support for collecting values into lists and sets during aggregation, enabling data denormalization directly within the pipeline.
collect_list(Field, Result): Collects all values into a list (preserving duplicates).- Implementation: Go slice (
[]interface{}). - Appends values efficiently.
- Implementation: Go slice (
collect_set(Field, Result): Collects unique values into a list (deduplicated).- Implementation: Go map (
map[interface{}]bool). - O(1) insertion, converts to slice for output.
- Implementation: Go map (
- Fully integrated with
group_by/4and multiple aggregation lists. - Compatible with other statistical and simple aggregations (e.g.,
[count(N), collect_list(Tags, T)]).
tests/test_go_array_agg.pl: Verified correct Go code generation for list appending and set map management/conversion.