[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] [Created] (CSV-236) Allow duplicate headers in CSV File
From:       "Eric K. Sender (JIRA)" <jira () apache ! org>
Date:       2019-01-30 21:09:00
Message-ID: JIRA.13212912.1548882498000.206916.1548882540126 () Atlassian ! JIRA
[Download RAW message or body]

Eric K. Sender created CSV-236:
----------------------------------

             Summary: Allow duplicate headers in CSV File
                 Key: CSV-236
                 URL: https://issues.apache.org/jira/browse/CSV-236
             Project: Commons CSV
          Issue Type: Improvement
          Components: Parser
    Affects Versions: Discussion
            Reporter: Eric K. Sender


Currently if a CSV file has a duplicate column header, a runtime exception is thrown:

[https://github.com/apache/commons-csv/blob/546fd69eaa6b3fd2c9da8b4222a3822f1ab53abd/src/main/java/org/apache/commons/csv/CSVParser.java#L492]


I think that may be a bit harsh reaction, as there could be some columns whose data \
is relative to its column order. I understand the header map uses the column name as \
the key, however I anticipate one could flip the map to be a Map<Integer, String> so \
its column number is the key.

Anyway I am curious what the genesis of this decision was to use column headers as \
the key and if it's worthwhile to flip the map and allow for duplicate column names.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic