Hello Daniel,
Thanks for the explanation, it sounds reasonable. I'm glad it is not a bug.
Regards,
Martin.
On 14/07/2023 10:29, Daniel Gustafsson wrote:
On 14 Jul 2023, at 07:53, Martin Butter <martin.butter@splendiddata.com> wrote:
While adapting a Java implementation of the SQL parser, I noticed that in structures JsonArrayAgg, JsonArrayConstructor, JsonArrayQueryConstructor and JsonObjectConstrutor, the absent_on_null field defaults to TRUE.
But in JsonObjectAgg, absent_on_null defaults to FALSE.
Is that intentionally?
I would say so, an empty NULL|ABSENT ON NULL clause for arrays is defined as
true, while for objects it's defined as false (which is shared between both
json_object() and json_objectagg()).
--
Daniel Gustafsson