Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/426#discussion_r26993339
  
    --- Diff: 
flink-scala/src/main/java/org/apache/flink/api/scala/operators/ScalaCsvInputFormat.java
 ---
    @@ -219,73 +92,24 @@ public OUT readRecord(OUT reuse, byte[] bytes, int 
offset, int numBytes) {
                }
     
                if (parseRecord(parsedValues, bytes, offset, numBytes)) {
    -                   OUT result = serializer.createInstance(parsedValues);
    -                   return result;
    +                   if (tupleSerializer != null) {
    +                           return 
tupleSerializer.createInstance(parsedValues);
    +                   } else {
    +                           try {
    +                                   for (int i = 0; i < pojoFields.length; 
i++) {
    +                                           pojoFields[i].set(reuse, 
parsedValues[i]);
    +                                   }
    +                           } catch (IllegalAccessException e) {
    +                                   LOG.error("Cannot set value to given 
type object!", e);
    --- End diff --
    
    same as in the `CsvInputFormat`. Forward the exception to kill the job.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to