substrait-io / substrait

A cross platform way to express data transformation, relational algebra, standardized record expression and plans.
https://substrait.io
Apache License 2.0
1.2k stars 156 forks source link

docs: clarify requirements for groupings and measures in AggregateRel #525

Closed vbarua closed 1 year ago

github-actions[bot] commented 1 year ago

ACTION NEEDED

Substrait follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

vbarua commented 1 year ago

The spec has some additional wording around the optionality of grouping sets and measures in the AggregateRel.

https://substrait.io/relations/logical_relations/#aggregate-properties

I was initially confused by how to represent a query like

SELECT a, b FROM foo GROUP BY a, b

because AggregateRel indicates

// A list of one or more aggregate expressions along with an optional filter.
  repeated Measure measures = 4;

However from the full spec the intent appears to be to represent this by not populating the measures at all.

This commits adds some additional language around the requirement for measures and groupings to the proto file.