[jOOQ/jOOQ#10060] In fact, the behaviour can be seen as correct.
The dialects do not agree on whether aggregating empty sets with JSON_ARRAYAGG() leads to NULL or an empty []
This commit is contained in:
parent
18abd3084b
commit
2622e3c0f8
@ -84,11 +84,11 @@ implements JSONArrayAggOrderByStep<J> {
|
||||
|
||||
// Workaround for https://jira.mariadb.org/browse/MDEV-21914
|
||||
if (!Tools.isEmpty(withinGroupOrderBy))
|
||||
ctx.visit(DSL.concat(inline('['), DSL.coalesce(groupConcat(arguments.get(0)).orderBy(withinGroupOrderBy), inline("")), inline(']')));
|
||||
ctx.visit(DSL.concat(inline('['), groupConcat(arguments.get(0)).orderBy(withinGroupOrderBy), inline(']')));
|
||||
|
||||
// Workaround for https://jira.mariadb.org/browse/MDEV-21912
|
||||
else
|
||||
ctx.visit(DSL.concat(inline('['), DSL.coalesce(groupConcat(arguments.get(0)), inline("")), inline(']')));
|
||||
ctx.visit(DSL.concat(inline('['), groupConcat(arguments.get(0)), inline(']')));
|
||||
|
||||
break;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user