Description
BC Break Report
Q | A |
---|---|
BC Break | yes |
Version | 2.6.1 |
Summary
After upgrading from 2.5.14 to 2.6.1 StringPrimary no longer accepts aggregate functions as argument(AVG, SUM, COUNT, MIN and MAX).
Which affects any functions depending on StringPrimary, for example CONCAT
Previous behavior
CONCAT(teable.field1, MAX(table.field2))
=> '{text from field1}{maximum value of field2}'
Current behavior
CONCAT(teable.field1, MAX(table.field2))
=> ERROR: Expected StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression, got 'MAX'
How to reproduce
pass any aggregate function to CONCAT (for example) as argument
PS
Old StringPrimary
function looked like:
case Lexer::T_CASE:
case Lexer::T_COALESCE:
case Lexer::T_NULLIF:
return $this->CaseExpression();
default:
if ($this->isAggregateFunction($lookaheadType)) {
return $this->AggregateExpression();
}
}
$this->syntaxError(
'StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression'
);
while new one missing part responsible for accepting aggregate expressions:
case Lexer::T_CASE:
case Lexer::T_COALESCE:
case Lexer::T_NULLIF:
return $this->CaseExpression();
}
$this->syntaxError(
'StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression'
);
Creating this as separate issue from #7205, because this concerns any function relient on StringPrimary