Skip to content

CSV: FAIL_ON_MISSING_COLUMNS does not work as expected when combined with withColumnReordering(true)Β #273

@ivangreene

Description

@ivangreene

The CSV feature CsvParser.Feature.FAIL_ON_MISSING_COLUMNS does not work as expected when using a typed CsvSchema with withColumnReordering(true). If a column appears in the POJO, but not in the file, no failure occurs. This seems to be due to the withColumnReordering(true) completely rebuilding the columns, but the FAIL_ON_MISSING_COLUMNS check only occurs during reading of individual rows of data, and it only checks against the rebuilt columns (from the file header, not against the POJO's columns).

Relevant lines:

Metadata

Metadata

Assignees

No one assigned

    Labels

    csvneed-test-caseFurther progress requires inclusion of problem reproduction, ideally test case

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions