[
https://issues.apache.org/jira/browse/FLINK-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14651673#comment-14651673
]
Fabian Hueske commented on FLINK-1665:
--------------------------------------
In fact, the current implementation of the CsvReader supports a mapping to Pojo
fields as suggested above.
The discussion for adding position annotations was started on the [PR which
adds POJO support for CSV
inputs|https://github.com/apache/flink/pull/426#issuecomment-77347164].
I think we also need a good solution to specify the order of Pojos.
I believe right now, this is only possible by implementing {{Comparable}} which
prohibits the use of normalized keys and forces the deserialization of whole
objects.
> Add optional annotations for POJOs to specify the order of fields
> -----------------------------------------------------------------
>
> Key: FLINK-1665
> URL: https://issues.apache.org/jira/browse/FLINK-1665
> Project: Flink
> Issue Type: Improvement
> Components: JobManager
> Affects Versions: 0.8.0, 0.9
> Reporter: Fabian Hueske
>
> The order of fields within a POJO is not well defined.
> We could provide an optional annotation such as {{@Position(int)}} to enable
> the definition of field orders.
> The order of fields is relevant when mapping data to POJOs such as when
> generating POJOs from CSV input, converting POJOs to tuples (for example for
> the expression API), or when sorting POJOs (see FLINK-1664).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)