Hi all, I’d like to propose adding SQL-standard `GROUPS` window frames to Spark SQL.
Spark currently supports `ROWS` and `RANGE`, but not `GROUPS`, which defines frame boundaries in terms of peer groups. This is useful where group sizes and ordering-key gaps vary, and cannot in general be expressed correctly with a fixed `ROWS` or `RANGE` frame. I’ve prepared a design proposal covering semantics, compatibility, implementation feasibility, testing, and behaviour across other SQL engines: https://docs.google.com/document/d/1BOVWBHz6vQi39uQ_8SJfMWg55oJrUqNMQAgtHXmTZhA/edit?usp=sharing I intend to implement this and open a draft PR. Before starting, I’d particularly appreciate feedback on: * whether this should go through SPIP or a normal JIRA + PR; * whether `GROUPS` support for Python/Pandas window UDAFs should be included initially or deferred. Any feedback on the proposed semantics or implementation direction would be very welcome. -- Best regards, Mark Andreev
