[ https://issues.apache.org/jira/browse/FLINK-38346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
dylanhz closed FLINK-38346. --------------------------- Resolution: Invalid > JSON_QUERY returns ARRAY<STRING> of incorrect format > ---------------------------------------------------- > > Key: FLINK-38346 > URL: https://issues.apache.org/jira/browse/FLINK-38346 > Project: Flink > Issue Type: Bug > Components: Table SQL / API > Reporter: dylanhz > Priority: Major > > {code:sql} > SELECT JSON_QUERY('[{"c":"c1"},{"c":"c2"}]', '$') > -- '[{"c":"c1"},{"c":"c2"}]' > SELECT JSON_QUERY('[{"c":"c1"},{"c":"c2"}]', '$' RETURNING ARRAY<STRING>) > -- [{c=c1}, {c=c2}] > {code} > The output format of ARRAY<STRING> is not JSON-formatted, and different with > normal usage without RETURNING clause, while in > [BigQuery|https://cloud.google.com/bigquery/docs/reference/standard-sql/json_functions#json_query_array] > they are the same. > I'd like to open a discussion for this, and I am considering two solutions as > follows: > - Modify the output format of JSON_QUERY, this will be a breaking change. > - Add a new function JSON_QUERY_ARRAY with JSON-formatted string output. -- This message was sent by Atlassian Jira (v8.20.10#820010)