[jOOQ/jOOQ#7539] Help the poor javac compiler, which again can't infer

This commit is contained in:
Lukas Eder 2024-04-05 09:48:04 +02:00
parent cfca1e440c
commit cece52fec3

View File

@ -178,16 +178,17 @@ implements
acceptOverClause(ctx);
break;
case CLICKHOUSE:
case CLICKHOUSE: {
Field<?> agg = arrayAggEmulation(distinct, arguments.get(0), withinGroupOrderBy);
ctx.visit(N_toJSONString).sql('(').visit(
apply(
arrayAggEmulation(distinct, arguments.get(0), withinGroupOrderBy),
a -> arguments.get(0).getDataType().isJSON()
? a.cast(JSON.array())
: a
)
arguments.get(0).getDataType().isJSON()
? agg.cast(JSON.array())
: agg
).sql(')');
break;
}
case SQLITE:
ctx.visit(N_JSON_GROUP_ARRAY).sql('(');