classAggregateResults
final class AggregateResults
The result of an aggregate function with one argument, COUNT(*) or COUNT(DISTINCT ...).
Rule: MYSQL-AGGREGATE-RESULT-001. COUNT is a BIGINT and never NULL. SUM and AVG of an exact number (an integer, DECIMAL, YEAR or BIT) are DECIMAL, of anything else DOUBLE. MIN and MAX have the type of their argument. The BIT_AND, BIT_OR and BIT_XOR of a binary string are a binary string, of anything else a BIGINT UNSIGNED; they are never NULL. STD, VARIANCE, STDDEV_SAMP and VAR_SAMP are DOUBLE, JSON_ARRAYAGG is JSON, ST_COLLECT a geometry. Every other aggregate is NULL for a group without non-NULL values. DISTINCT in a windowed aggregate is not supported by the server (ER_NOT_SUPPORTED_YET). Terminates: a fixed number of tests on one call. Source: https://dev.mysql.com/doc/refman/8.4/en/aggregate-functions.html, https://dev.mysql.com/doc/refman/8.4/en/bit-functions.html#function_bit-and, https://dev.mysql.com/doc/refman/8.4/en/window-function-restrictions.html. Status: Implemented.
Methods§
public function aggregate(
Aggregate $call,
list<ScalarFact> $arguments,
Derivation $derivation,
): ScalarFactAnswers the facts of an aggregate call and reports what the server rejects.
Parameters
$call | Aggregate | |
$arguments | list<ScalarFact> | |
$derivation | Derivation |
Returns
Test cases 2
Called from 1
Calls 30
- method-call Derivation::report() line 47
- new UnsupportedWindowing line 47
- class-const WindowingLimit::DistinctAggregate() line 47
- new NullOnly line 49
- new TypeClasses line 50
- class-const AggregateFunction::Count() line 53
- new ScalarFact line 53
- new Known line 53
- class-const TypeClass::Integer() line 53
- class-const Nullability::NotNull() line 53
- class-const AggregateFunction::Sum() line 54
- class-const AggregateFunction::Average() line 54
- method-call AggregateResults::sum() line 54
- class-const Nullability::Nullable() line 54
- class-const AggregateFunction::Minimum() line 55
- class-const AggregateFunction::Maximum() line 55
- class-const AggregateFunction::BitAnd() line 56
- class-const AggregateFunction::BitOr() line 56
- class-const AggregateFunction::BitXor() line 56
- method-call AggregateResults::bits() line 56
- class-const AggregateFunction::StandardDeviation() line 57
- class-const AggregateFunction::Variance() line 57
- class-const AggregateFunction::SampleStandardDeviation() line 57
- class-const AggregateFunction::SampleVariance() line 58
- class-const TypeClass::Floating() line 58
- class-const AggregateFunction::JsonArray() line 59
- class-const TypeClass::Json() line 59
- class-const AggregateFunction::Collect() line 60
- method-call TypeClasses::fact() line 60
- class-const TypeClass::Spatial() line 60
Answers the type of SUM and AVG.
Parameters
$argument | TypeFact |
Returns
Test cases 1
Called from 1
Calls 10
- method-call TypeClasses::classes() line 69
- new TypeClasses line 69
- method-call TypeClasses::fact() line 71
- class-const TypeClass::Decimal() line 71
- class-const TypeClass::Floating() line 71
- function-call
in_arrayline 75 - class-const TypeClass::Integer() line 75
- class-const TypeClass::Unsigned() line 75
- class-const TypeClass::Year() line 75
- class-const TypeClass::Bit() line 75
Answers the type of BIT_AND, BIT_OR and BIT_XOR.
Parameters
$argument | TypeFact |
Returns
Test cases 1
Called from 1
Calls 6
- method-call TypeClasses::classes() line 86
- new TypeClasses line 86
- new Known line 88
- class-const TypeClass::Unsigned() line 88
- method-call TypeClasses::fact() line 91
- class-const TypeClass::Binary() line 91
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.