You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aggregate functions perform some operation on the result set for a query. The basics are avg, count, max, min and sum. A typical query might look like SELECT count(*) FROM foo. Note that the aggregate function might affect index selection. For example, SELECT MAX(timestamp) FROM foo might be satisfied via a single index read if there is an index on timestamp.
Conveniently, aggregate functions cannot be mixed with non-aggregate values. This is not valid: SELECT AVG(k), k FROM foo
The text was updated successfully, but these errors were encountered:
The initial implementation can be fairly dumb: if an aggregate function is detected add a new aggregateNode which evaluates the expression. Optimizing MIN and MAX should be done where an appropriate index is available. Trying to distribute the aggregate calculation will be left for later.
Added planner.groupBy which analyzes looks for any aggregate functions
in the select targets. If an aggregate function is found, we check to
make sure the select targets are valid and then rewrite the scanNode so
that it outputs the argument expressions for the aggregates.
Fixes#2043.
Aggregate functions perform some operation on the result set for a query. The basics are
avg
,count
,max
,min
andsum
. A typical query might look likeSELECT count(*) FROM foo
. Note that the aggregate function might affect index selection. For example,SELECT MAX(timestamp) FROM foo
might be satisfied via a single index read if there is an index ontimestamp
.Conveniently, aggregate functions cannot be mixed with non-aggregate values. This is not valid:
SELECT AVG(k), k FROM foo
The text was updated successfully, but these errors were encountered: