OptionAggregatorOutputRowLimit
Introduced Version1.158
Description Number of rows allowed in queries with aggregate functions.
Default100 million rows

Sets a limit to the number of rows allowed in queries with aggregate functions. If the limit set by this variable is exceeded, aggregate functions in the query get cancelled - provided that the feature flag on the variable CancelQueriesExceedingAggregateOutputRowLimit is enabled. If instead the feature flag is not enabled for the variable CancelQueriesExceedingAggregateOutputRowLimit, then a WARN log level is produced and the query continues to run even if the given limit is exceeded.