You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/08/14 04:44:00 UTC

[jira] [Updated] (SPARK-58730) Support the ANSI SQL/JSON JSON_ARRAY constructor function

     [ https://issues.apache.org/jira/browse/SPARK-58730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated SPARK-58730:
-----------------------------------
    Labels: pull-request-available  (was: )

> Support the ANSI SQL/JSON JSON_ARRAY constructor function
> ---------------------------------------------------------
>
>                 Key: SPARK-58730
>                 URL: https://issues.apache.org/jira/browse/SPARK-58730
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.3.0
>            Reporter: Ganesha S
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.4.0
>
>
> Add the SQL:2016 JSON_ARRAY constructor (feature T811). It builds a JSON array from an argument value list, controls null elements via (NULL | ABSENT) ON NULL (default ABSENT ON NULL — the opposite of JSON_OBJECT, so NULL elements are dropped), and supports an optional RETURNING type (STRING default). Nested JSON_ARRAY / JSON_OBJECT compose.
> Today, the only workaround is to_json(array(...)), which cannot express ABSENT ON NULL and does not match the standard name used by Oracle, SQL Server (2022+), MySQL, Trino, BigQuery, and DuckDB, forcing manual rewrites when migrating.
> Scope: add reserved token(s) and a dedicated SqlBaseParser production, an AstBuilder visitor, a new Catalyst constructor expression reusing the existing Jackson JSON-generation path (to_json / StructsToJsonEvaluator), a nullBehavior enum, docs, and golden-file + unit test coverage. VARIANT RETURNING is deferred (STRING-only v1).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org