You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (Jira)" <ji...@apache.org> on 2025/02/05 12:02:00 UTC

[jira] [Updated] (FLINK-35687) JSON_QUERY should return a well formatted nested objects/arrays for ARRAY

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

Dawid Wysakowicz updated FLINK-35687:
-------------------------------------
    Fix Version/s: 2.0-preview
                       (was: 1.20.0)

> JSON_QUERY should return a well formatted nested objects/arrays for ARRAY<STRING>
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-35687
>                 URL: https://issues.apache.org/jira/browse/FLINK-35687
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: Dawid Wysakowicz
>            Assignee: Dawid Wysakowicz
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0-preview
>
>
> {code}
> SELECT JSON_QUERY('{"items": [{"itemId":1234, "count":10}]}', '$.items' RETURNING ARRAY<STRING>)
> {code}
> returns
> {code}
> ['{itemId=1234, count=10}']
> {code}
> but it should:
> {code}
> ['{"itemId":1234, "count":10}']
> {code}
> We should call jsonize for Collection types here: https://github.com/apache/flink/blob/f6f88135b3a5fa5616fe905346e5ab6dce084555/flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/SqlJsonUtils.java#L268



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