-
Notifications
You must be signed in to change notification settings - Fork 884
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
Improve CSV error messages #3468
Improve CSV error messages #3468
Conversation
FWIW I think this logic is only used by the schema inference logic, following #3365 the core parsing logic uses a different code path.
A unit test within the module that produces the error, in the case of this PR currently reader, but potentially records if you want to cover that also |
let batch = csv.next().unwrap(); | ||
assert!(batch.is_err()); | ||
assert_eq!( | ||
"Csv error: incorrect number of fields, expected 2 got 3", |
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.
No line number is included here .. I wonder what is needed to have the csv crate populate the position in the error? I guess I have some research to do ...
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.
This logic is only used by the inference logic (which FWIW desperately needs some TLC), not the reader
ok, thanks .. will close this for now then |
I'll see if I can't quickly bash something out for you, as I've touched this code recently |
Which issue does this PR close?
Closes #3467
Rationale for this change
Better UX
What changes are included in this PR?
Improve error message
Are there any user-facing changes?
No