Re: Registering RawType with LegacyTypeInfo via Flink CREATE TABLE DDL
Posted by
Danny Chan-2 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Registering-RawType-with-LegacyTypeInfo-via-Flink-CREATE-TABLE-DDL-tp40289p40316.html
> SQL parse failed. Encount
What syntax did you use ?
> TypeConversions.fromDataTypeToLegacyInfo cannot convert a plain RAW type back to TypeInformation.
Did you try to construct type information by a new fresh TypeInformationRawType ?
An expansion to my question:
What I really want is for the UDF to return `RAW(io.circe.Json, ?)` type, but I have to do a conversion between Table and DataStream, and TypeConversions.fromDataTypeToLegacyInfo cannot convert a plain RAW type back to TypeInformation.
On Thu, Dec 24, 2020 at 12:59 PM Yuval Itzchakov <
[hidden email]> wrote:
Hi,
I have a UDF which returns a type of MAP<STRING, LEGACY('RAW', 'ANY<io.circe.Json>')>. When I try to register this type with Flink via the CREATE TABLE DDL, I encounter an exception:
- SQL parse failed. Encountered "(" at line 2, column 256.
Was expecting one of:
"NOT" ...
"NULL" ...
">" ...
"MULTISET" ...
"ARRAY" ...
"." ...
Which looks like the planner doesn't like the round brackets on the LEGACY type. What is the correct way to register the table with this type with Flink?
--
Best Regards,
Yuval Itzchakov.
--
Best Regards,
Yuval Itzchakov.