Hanyu Zheng created FLINK-41574:
-----------------------------------
Summary: Validate the first argument type of JSON_EXISTS
Key: FLINK-41574
URL: https://issues.apache.org/jira/browse/FLINK-41574
Project: Flink
Issue Type: Improvement
Components: Table SQL / Planner
Affects Versions: 2.3.0
Reporter: Hanyu Zheng
Fix For: 2.3.0
JSON_EXISTS accepts a ROW as its first argument during validation. No call
generator handles a ROW argument, so the call falls through to the
ExprCodeGenerator fallback. This happens in both batch and streaming mode.
{code:sql}
CREATE TABLE T (r ROW<a INT, b STRING>) WITH ('connector' = 'datagen');
SELECT JSON_EXISTS(r, '$.a') FROM T;
{code}
{noformat}
Unsupported call: JSON_EXISTS(ROW<`a` INT, `b` STRING>, CHAR(3) NOT NULL) If
you think this function should be supported, you can create an issue and start
a discussion for it.
{noformat}
The validator should reject a first argument that isn't a character string,
with a message that lists the supported types. Users can pass JSON_STRING(r) to
keep the ROW input.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)