Closed tantaman closed 7 months ago
API:
q.select(agg.sum('x'), agg.avg('y'), agg.count());
Allows users to aggregate against an entire table without applying a group-by
group-by
The main value-add here is to change count to now be selectable with other fields.
count
E.g.,
before:
q.count(); and q.select(fields...) were exclusive operations.
q.count();
q.select(fields...)
Now we can:
q.select(fields..., agg.count())
If the user selects a field that was not aggregated it returns a value from an arbitrary row.
This also allows us to drop PrimitiveView and make all queries sink to the same view class.
PrimitiveView
API:
Allows users to aggregate against an entire table without applying a
group-by
The main value-add here is to change
count
to now be selectable with other fields.E.g.,
before:
q.count();
andq.select(fields...)
were exclusive operations.Now we can:
q.select(fields..., agg.count())
If the user selects a field that was not aggregated it returns a value from an arbitrary row.
This also allows us to drop
PrimitiveView
and make all queries sink to the same view class.