AggregationUse: { kind: "group" } | { kind: "window"; sorted: boolean }

Where aggregations are: a Group, or a window, which also knows the rank functions, and whether it sorts its rows, which they need