Hi Ramana,

What connector do you use or how do you instantiate the TableSource?
Also which catalog do you use and how do you register your table in that
catalog?

The problem is that conversion from TypeInformation to DataType produces
legacy types (because they cannot be mapped exactyl 1-1 to the new types).

If you can change the code of the TableSource you can return in the
TableSource#getProducedType the tableSchema.toRowDataType, where the
tableSchema is the schema coming from catalog. Or you can make sure that
the catalog table produces the legacy type:

TableSchema.field("field", Types.OBJECT_ARRAY(Types.STRING));

In 1.11 we will introduce new sources and formats already working
entirely with the new type system (AvroRowDataDeserializationSchema and
KafkaDynamicTable).

Hope this helps a bit.

Best,

Dawid

On 04/06/2020 13:43, Ramana Uppala wrote:
> Hi,
> Avro schema contains Array<String> type and we created TableSchema out of the 
> AvroSchema and created a table in catalog. In the catalog, this specific 
> filed type shown as ARRAY<VARCHAR(2147483647)>. We are using 
> AvroRowDeserializationSchema with the connector and returnType of TableSource 
> showing Array<String> mapped to LEGACY('ARRAY', 'ANY<[Ljava.lang.String;, by 
> AvroSchemaConverter
>
> when we are running the application, planner validating physical types and 
> logical types and we are getting below error.
>
> of table field 'XYZ' does not match with the physical type ROW<
>
> Any suggestions on how to resolve this ? is this a bug ?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to