Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Fail for missing column values (CsvParser.Feature.FAIL_ON_MISSING_COLUMNS) #140

Closed
jwilmoth opened this issue Jan 9, 2017 · 1 comment
Closed
Labels
Milestone

Comments

@jwilmoth
Copy link

jwilmoth commented Jan 9, 2017

With a bean definition like:

class Person {
  String firstName;
  String lastName;
  int age;
  int birthYear;
}

The following string input "name" is functionally equivalent to "name,," even when using a CsvMapper with a schema created from the class. This makes it impossible to ensure the input was purposely truncated or done so in error. This request is to enable functionality that would require the number of field delimiters equal the number of fields defined in the schema.

@cowtowncoder
Copy link
Member

Ok, so, the request is to make sure that number of columns found equals number of columns defined in CsvSchema? Sounds reasonable.

@cowtowncoder cowtowncoder changed the title Add support for ensuring all schema fields are represented in readValue input Fail for missing column values (JsonParser.Feature.FAIL_ON_MISSING_COLUMNS) Mar 16, 2017
@cowtowncoder cowtowncoder added this to the 2.9.0.pr2 milestone Mar 16, 2017
@cowtowncoder cowtowncoder changed the title Fail for missing column values (JsonParser.Feature.FAIL_ON_MISSING_COLUMNS) Fail for missing column values (CsvParser.Feature.FAIL_ON_MISSING_COLUMNS) Sep 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants