[
https://issues.apache.org/jira/browse/FLINK-22163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
François Lacombe updated FLINK-22163:
-------------------------------------
Description:
Dear maintainers
flink-csv's CsvRowSerializationSchema currently rely on legacy TypeInformation
to serialize java Types.
It doesn't support ZonedDateTime (only LocalDateTime with LOCAL_DATE_TIME)
An exception is thrown when CsvRowSerializationSchema is built with a
RowTypeInformaton containing a TypeInformation.of(ZonedDateTime.class). See
CsvRowSchemaConverter.java line 201.
{code:java}
java.lang.IllegalArgumentException: Unsupported type information
'GenericType<java.time.ZonedDateTime>' for field 'periode'.
at
org.apache.flink.formats.csv.CsvRowSchemaConverter.convertType(CsvRowSchemaConverter.java:201)
at
org.apache.flink.formats.csv.CsvRowSchemaConverter.convert(CsvRowSchemaConverter.java:155)
at
org.apache.flink.formats.csv.CsvRowSerializationSchema$Builder.<init>(CsvRowSerializationSchema.java:111)
...{code}
A quick fix would be to use `toString()` by default in the serializer instead
of throwing an Exception. Apache CSV already do this way.
I'm using flink-csv and Apache Flink 1.12.1
Am I missing anything regarding a more recent flink-csv implementation?
If not, is it planned to move flink-csv to DataTypes types (with
DataTypes.TIMESTAMP_WITH_TIME_ZONE support)?
All the best
was:
Dear maintainers
flink-csv's CsvRowSerializationSchema currently rely on legacy TypeInformation
to serialize java Types.
It doesn't support ZonedDateTime (only LocalDateTime with LOCAL_DATE_TIME)
An exception is thrown when CsvRowSerializationSchema is built with a
RowTypeInformaton containing a TypeInformation.of(ZonedDateTime.class). See
CsvRowSchemaConverter.java line 201.
```
java.lang.IllegalArgumentException: Unsupported type information
'GenericType<java.time.ZonedDateTime>' for field 'periode'.
at
org.apache.flink.formats.csv.CsvRowSchemaConverter.convertType(CsvRowSchemaConverter.java:201)
at
org.apache.flink.formats.csv.CsvRowSchemaConverter.convert(CsvRowSchemaConverter.java:155)
at
org.apache.flink.formats.csv.CsvRowSerializationSchema$Builder.<init>(CsvRowSerializationSchema.java:111)
...
```
A quick fix would be to use `toString()` by default in the serializer instead
of throwing an Exception. Apache CSV already do this way.
I'm using flink-csv and Apache Flink 1.12.1
Am I missing anything regarding a more recent flink-csv implementation?
If not, is it planned to move flink-csv to DataTypes types (with
DataTypes.TIMESTAMP_WITH_TIME_ZONE support) ?
All the best
> DataTypes implementation for flink-csv with ZonedDateTime support
> -----------------------------------------------------------------
>
> Key: FLINK-22163
> URL: https://issues.apache.org/jira/browse/FLINK-22163
> Project: Flink
> Issue Type: Wish
> Components: Table SQL / Ecosystem
> Affects Versions: 1.12.1
> Reporter: François Lacombe
> Priority: Trivial
>
> Dear maintainers
> flink-csv's CsvRowSerializationSchema currently rely on legacy
> TypeInformation to serialize java Types.
> It doesn't support ZonedDateTime (only LocalDateTime with LOCAL_DATE_TIME)
> An exception is thrown when CsvRowSerializationSchema is built with a
> RowTypeInformaton containing a TypeInformation.of(ZonedDateTime.class). See
> CsvRowSchemaConverter.java line 201.
> {code:java}
> java.lang.IllegalArgumentException: Unsupported type information
> 'GenericType<java.time.ZonedDateTime>' for field 'periode'.
> at
> org.apache.flink.formats.csv.CsvRowSchemaConverter.convertType(CsvRowSchemaConverter.java:201)
> at
> org.apache.flink.formats.csv.CsvRowSchemaConverter.convert(CsvRowSchemaConverter.java:155)
> at
> org.apache.flink.formats.csv.CsvRowSerializationSchema$Builder.<init>(CsvRowSerializationSchema.java:111)
> ...{code}
> A quick fix would be to use `toString()` by default in the serializer instead
> of throwing an Exception. Apache CSV already do this way.
>
> I'm using flink-csv and Apache Flink 1.12.1
> Am I missing anything regarding a more recent flink-csv implementation?
> If not, is it planned to move flink-csv to DataTypes types (with
> DataTypes.TIMESTAMP_WITH_TIME_ZONE support)?
>
> All the best
--
This message was sent by Atlassian Jira
(v8.3.4#803005)