Continuation thread to <https://apache-flink.slack...
# troubleshooting
s
Continuation thread to https://apache-flink.slack.com/archives/C03G7LJTS2G/p1671671687114309. I'm unable to use ROW() for constructing nested type when the input param is nested/array type. example -
Copy code
SELECT CAST(ROW(person.name, person.age) as ROW< new_name string, new_age int > ) as new_person FROM (VALUES (CAST(ROW('Bob', 10) as ROW< name string, age int>)),(CAST(ROW('Alice', 20) as ROW< name string, age int>))) AS PersonTable(person);
>
[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.sql.parser.impl.ParseException: Encountered "." at line 1, column 23.
Was expecting one of:
    ")" ...
    "," ...
Added the comment to this similar ticket - https://issues.apache.org/jira/browse/FLINK-9161. Please lmk if anyone knows a way to make this work.
j
have you taken a look at the json functions to see if they would help here?
s
sorry for late reply . was able to get this working by using another cast inside the row like
ROW(cast(person.name) as string...