[
https://issues.apache.org/jira/browse/FLINK-2435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15714766#comment-15714766
]
Fabian Hueske commented on FLINK-2435:
--------------------------------------
Hi [~anmu], sorry for the late reply.
I still think that this might be a valuable feature.
By custom data type, I mean some custom Java class that should be parsed using
the CsvReader. Since this issue was created, a couple of parser have been added
(Date, Time, Timestamp, BigInteger, BigDecimal, ...).
As [~Zentol] mentioned, it is not clear yet how the custom parser would be
registered and loaded at runtime. So there would also be a bit of design
involved in solving this issue.
However, I think this issue does not have a high priority right now. It is
rather a nice to have thing.
Unless you have a concrete use case for it, I would rather work on something
else because it might take some time until somebody reviews the PR.
> Add support for custom CSV field parsers
> ----------------------------------------
>
> Key: FLINK-2435
> URL: https://issues.apache.org/jira/browse/FLINK-2435
> Project: Flink
> Issue Type: New Feature
> Components: DataSet API
> Affects Versions: 0.10.0
> Reporter: Fabian Hueske
> Assignee: Anton Mushin
> Fix For: 1.0.0
>
>
> The {{CSVInputFormats}} have only {{FieldParsers}} for Java's primitive types
> (byte, short, int, long, float, double, boolean, String).
> It would be good to add support for CSV field parsers for custom data types
> which can be registered in a {{CSVReader}}.
> We could offer two interfaces for field parsers.
> 1. The regular low-level {{FieldParser}} which operates on a byte array and
> offsets.
> 2. A {{StringFieldParser}} which operates on a String that has been extracted
> by a {{StringParser}} before. This interface will be easier to implement but
> less efficient.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)