Ramin Gharib created FLINK-41346:
------------------------------------
Summary: Add VARIANT_OBJECT_AGG
Key: FLINK-41346
URL: https://issues.apache.org/jira/browse/FLINK-41346
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API, Table SQL / Runtime
Reporter: Ramin Gharib
{code:sql}
VARIANT_OBJECT_AGG(key, value) -- VARIANT, aggregate
-- over the rows ('A1', 2) and ('B7', 1)
VARIANT_OBJECT_AGG(sku, qty) -- {"A1":2,"B7":1}
{code}
Scope:
* A value can be any type that CAST(x AS VARIANT) accepts, and keeps that type.
* Rows with a SQL NULL value are skipped. TO_VARIANT(value) keeps them as
variant nulls.
* A NULL or duplicate key is an error, as in VARIANT_OBJECT. A group with no
rows left gives NULL.
* On an updating input, a retraction removes the row's key, as JSON_OBJECTAGG
does.
* Table API and PyFlink expressions, SQL and Table API tests including
retractions, docs.
Depends on FLINK-41345
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)