Github user FelixNeutatz commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/201#discussion_r20706975
--- Diff:
flink-core/src/main/java/org/apache/flink/api/common/io/DelimitedInputFormat.java
---
@@ -486,8 +536,42 @@ public boolean reachedEnd() {
@Override
public OT nextRecord(OT record) throws IOException {
if (readLine()) {
- return readRecord(record, this.currBuffer,
this.currOffset, this.currLen);
+ if (commentPrefix != null) {
+ //check record for comments
+ Boolean isComment = true;
+ for (int i = 0; i < commentPrefix.length; i++) {
+ if (commentPrefix[i] !=
this.currBuffer[this.currOffset + i]) {
+ isComment = false;
+ break;
+ }
+ }
+ if (isComment) {
+ this.commentCount++;
+ return nextRecord(record);
+ }
+ }
+
+ OT returnRecord = readRecord(record, this.currBuffer,
this.currOffset, this.currLen);
+
+ if (returnRecord == null) {
--- End diff --
Invalid lines are not skipped by default: CsvReader.class
```java
protected boolean ignoreInvalidLines = false;
```
---
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.
---