File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
tests/Type/Doctrine/Query Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 5050use function serialize ;
5151use function sprintf ;
5252use function strtolower ;
53+ use function strtoupper ;
5354use function unserialize ;
5455
5556/**
@@ -930,7 +931,7 @@ public function walkSimpleSelectExpression($simpleSelectExpression): string
930931 */
931932 public function walkAggregateExpression ($ aggExpression ): string
932933 {
933- switch ($ aggExpression ->functionName ) {
934+ switch (strtoupper ( $ aggExpression ->functionName ) ) {
934935 case 'MAX ' :
935936 case 'MIN ' :
936937 $ type = $ this ->unmarshalType (
Original file line number Diff line number Diff line change @@ -645,6 +645,19 @@ public function getTestData(): iterable
645645 ' ,
646646 ];
647647
648+ yield 'aggregate lowercase ' => [
649+ $ this ->constantArray ([
650+ [
651+ new ConstantStringType ('foo ' ),
652+ TypeCombinator::addNull ($ this ->numericStringified ()),
653+ ],
654+ ]),
655+ '
656+ SELECT avg(m.intColumn) as foo
657+ FROM QueryResult\Entities\Many m
658+ ' ,
659+ ];
660+
648661 yield 'aggregate with group by ' => [
649662 $ this ->constantArray ([
650663 [
You can’t perform that action at this time.
0 commit comments