kgyrtkirk commented on a change in pull request #1032: CALCITE-2769: CSV 
Adapter does not handle - Empty and malformed csv lines, space before or after 
comma
URL: https://github.com/apache/calcite/pull/1032#discussion_r257631585
 
 

 ##########
 File path: 
example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvEnumerator.java
 ##########
 @@ -201,7 +201,11 @@ public boolean moveNext() {
             }
           }
         }
-        current = rowConverter.convertRow(strings);
+        try {
+          current = rowConverter.convertRow(strings);
+        } catch (Exception e) {
+          continue;
 
 Review comment:
   I don't think we should skip records if the conversion fails; I think every 
row should contain a full record.
   A more descriptive error message and some info about where is the line in 
the file which is incorrect would probably help the end user to correct the 
mistake.
   https://tools.ietf.org/html/rfc4180 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to