Subject: 16beta2 SQL parser: different defaults on absent_on_null

From: Martin Butter <[email-masked]>
Date: Fri, 14 Jul 2023 07:53:14 +0200

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?

Regards,
Martin.

---

From: Daniel Gustafsson <[email-masked]>
Date: Fri, 14 Jul 2023 10:29:53 +0200

> On 14 Jul 2023, at 07:53, Martin Butter <[email-masked]> 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.

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