Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.5.1
-
Ubuntu
Description
The standard for `JSON_ARRAYAGG` has an implicit default value of `ABSENT ON NULL`. MariaDB does not implicitly apply this option, and applies `NULL ON NULL` as the incorrect default:
See:
- MSSQL - https://learn.microsoft.com/en-us/sql/t-sql/functions/json-arrayagg-transact-sql?view=azuresqldb-current
- Oracle - https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/JSON_ARRAYAGG.html
- IBM - https://www.ibm.com/docs/en/i/7.5?topic=functions-json-arrayagg
Note, MySQL is also has a bugged approach:
- MySQL (also bugged) https://bugs.mysql.com/bug.php?id=90835
The immediate fix is to just change this to true.
bool skip_nulls() const override { return false; } |
Adding support for `NULL_ON_NULL` and `ABSENT_ON_NULL` could be added on separately.