Emits a group as <input>->groupBy(~[<keys>], ~[<aggregations>]), the keys in the order listed, or with no key <input>->aggregate(~[<aggregations>]) (groupBy(~[], …) fails on the engine, PLAN §11.5). Averages are written as average(): the engine already writes 1.0 * before an integer's. The emitter checks the columns come out as the node's inferred schema, so a mismatch fails in Cube, not on the engine.