[ https://issues.apache.org/jira/browse/FLINK-35687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17859674#comment-17859674 ]
david radley commented on FLINK-35687: -------------------------------------- [~dwysakowicz] Thanks for clarifying. * are you saying that this is not an issue before the RETURNING keyword. I had thought that the default would be a return a string. Does this string have the _=_ s in , the response in the example looks like a String (i.e. what would have been returned before the RETURNING keyword was added) . * the example given has ARRAY<STRING>. Shouldn't this return an array of Strings in this case and not a JSON Object? * If this behaviour is new at 1.19 then I agree that correcting in 1.19.1 is not an issue. If this has been around since 1.15, there could be more of a migration impact. WDYT? > JSON_QUERY should return a proper JSON for ARRAY<STRING> > -------------------------------------------------------- > > Key: FLINK-35687 > URL: https://issues.apache.org/jira/browse/FLINK-35687 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.19.1 > Reporter: Dawid Wysakowicz > Assignee: Dawid Wysakowicz > Priority: Major > Fix For: 1.20.0 > > > {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)