dawidwys commented on PR #24704: URL: https://github.com/apache/flink/pull/24704#issuecomment-2126455846
I believe this falls into `ON EMPTY` category and the default is `NULL`. If you use `lax` strategy the checks are less strict and there is no error, but no results. I am not an expert on the JSON expressions though. That's why when you use: ``` SELECT JSON_QUERY('{"a":[{"c":Null},{"c":"c2"}]}', 'lax $.a[*].c' RETURNING ARRAY<STRING> ERROR ON ERROR NULL ON EMPTY); // explicitly specified the other parameter using the default value ``` you get `null` if you run: ``` SELECT JSON_QUERY('{"a":[{"c":Null},{"c":"c2"}]}', 'lax $.a[*].c' RETURNING ARRAY<STRING> ERROR ON ERROR ERROR ON EMPTY); ``` you get an error: ``` Caused by: org.apache.flink.table.api.TableRuntimeException: Empty result of JSON_QUERY function is not allowed ``` Bear in mind that I have not changed anything in the json extraction logic. If you think the JSON expressions don't work the way you'd like let's fire a different ticket. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org