-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow reading of malformed CSV #901
Conversation
@benmccann, I find that I didn't create branch for this issue. What should I do now? |
@@ -154,6 +157,10 @@ public boolean ignoreZeroDecimal() { | |||
return ignoreZeroDecimal; | |||
} | |||
|
|||
public boolean ignoreInvalidRows() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a method comment.
I'm not sure this is a good method name. It seems there are many ways that a row could be invalid, but the behavior is simply to skip (more descriptive than ignore) rows when the row length differs from the expected number of columns (skipRowsWithInvalidColumnCount()?)
The method comment should describe how the 'valid' number of columns is determined. Is it from the header?, What if there is no header (ie, the noHeader() option is used). Add a test that shows that it works as expected when there is no header.
That's okay. You can push additional changes to your |
@lwhite1 @benmccann, Thanks a lot! I changed the method name and add comments. Also added a test without Header. Could you please check if there is anything else that needs to be changed? |
Thanks for contributing.
Description
add ignoreInvalidRows option in
CsvReadOptions
andReadOptions
to skip invalid csv rowsTesting
add 2 unit tests