@@ -57,7 +57,7 @@ final class QueryScope
5757 /**
5858 * @param list<Join> $joinedTables
5959 */
60- public function __construct (Table $ fromTable , array $ joinedTables , ?SqlSerializable $ whereCondition )
60+ public function __construct (Table $ fromTable , array $ joinedTables , ?SqlSerializable $ whereCondition, bool $ hasGroupBy )
6161 {
6262 $ this ->fromTable = $ fromTable ;
6363 $ this ->joinedTables = $ joinedTables ;
@@ -73,12 +73,12 @@ public function __construct(Table $fromTable, array $joinedTables, ?SqlSerializa
7373 new InstrReturnTypeExtension (),
7474 new StrCaseReturnTypeExtension (),
7575 new ReplaceReturnTypeExtension (),
76- new AvgReturnTypeExtension (),
77- new SumReturnTypeExtension (),
76+ new AvgReturnTypeExtension ($ hasGroupBy ),
77+ new SumReturnTypeExtension ($ hasGroupBy ),
7878 new IsNullReturnTypeExtension (),
7979 new AbsReturnTypeExtension (),
8080 new RoundReturnTypeExtension (),
81- new MinMaxReturnTypeExtension (),
81+ new MinMaxReturnTypeExtension ($ hasGroupBy ),
8282 ];
8383 }
8484
0 commit comments