[ 
https://issues.apache.org/jira/browse/FLINK-2690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906467#comment-14906467
 ] 

ASF GitHub Bot commented on FLINK-2690:
---------------------------------------

Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/1141#issuecomment-142956414
  
    Yes the reason why I introduced the `CommonCSVInputFormat` instead of 
unifying it with the `GenericCsvInputFormat` was that we still have the Record 
API `CsvInputFormat` in the code base. It doesn't need the pojo type 
information and, thus, I thought that it does not make sense to let it inherit 
from a class which has these fields. Actually, I would be in favour of removing 
the Record API's `CsvInputFormat` if possible. Moreover, I would like to more 
cleanly separate the tuple type `CsvInputFormat` and the pojo type 
`CsvInputFormat`, because the pojo support was kind of hacked into the original 
`CsvInputFormat`. Also the way the input format is set up, is imho a little bit 
clumsy and error-prone (see https://issues.apache.org/jira/browse/FLINK-2692). 
But this has no high priority.


> CsvInputFormat cannot find the field of derived POJO class
> ----------------------------------------------------------
>
>                 Key: FLINK-2690
>                 URL: https://issues.apache.org/jira/browse/FLINK-2690
>             Project: Flink
>          Issue Type: Bug
>          Components: Java API, Scala API
>    Affects Versions: 0.10
>            Reporter: Chiwan Park
>            Assignee: Till Rohrmann
>
> A user reports {{CsvInputFormat}} cannot find the field of derived POJO 
> class. 
> (http://mail-archives.apache.org/mod_mbox/flink-user/201509.mbox/%3ccaj54yvi6cbldn7cypey+xe8a5a_j1-6tnx1wm1eb63gvnqd...@mail.gmail.com%3e)
> The reason of the bug is that {{CsvInputFormat}} uses {{getDeclaredField}} 
> method without scanning base classes to find the field. When 
> {{CsvInputFormat}} was wrote, {{TypeInformation}} cannot be serialized. So we 
> needed to initialize {{TypeInformation}} in {{open}} method manually. Some 
> mistakes in initializing cause this bug.
> After FLINK-2637 is merged, we can serialize {{TypeInformation}} and don't 
> need to create field objects in {{CsvInputFormat}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to