-
Notifications
You must be signed in to change notification settings - Fork 5
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
Improving error message when using the outdated csv format #1113
Improving error message when using the outdated csv format #1113
Conversation
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.
The existing error message (The size of the headline does not fit to the size of the resulting fields to attributes mapping.
) could also be made more clear. I'd remove the print of fieldsToAttributesKeySet
, since it's just going to be headline
with a maximum size of the length of fieldVals
.
Please also make sure that there are tests for both cases: Too many and too little headline fields.
src/main/java/edu/ie3/datamodel/io/source/csv/CsvDataSource.java
Outdated
Show resolved
Hide resolved
…d-input-data # Conflicts: # CHANGELOG.md
Looking into this again, we might introduce a new bug here if there are multiple headlines with the same (or similar, since they're case-insensitive) names. So it might have been good the way it's been before. What for sure needs to be fixed is line 172 in the original CsvDataSource, since the headlines array might be shorter than the fieldVals array. Let me prepare my proposal. |
Well that escalated quickly.
|
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.
@staudtMarius gave his ok to my changes, merging :)
Resolves #1112