[ 
https://issues.apache.org/jira/browse/CSV-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14028719#comment-14028719
 ] 

Gary Gregory commented on CSV-121:
----------------------------------

Playing devil's advocate here. The only case where I have seen empty column 
names is when looking at certain SQL result sets where a column value is the 
result of a computation for example, SELECT 1+COLUMNX FROM SOMETABLE. In this 
case, this result has one column but no column name. In SQL you can usually 
assign a label to a column but you do not have to. Therefore, if your CSV file 
is the result of a database export, it is quite possible to end up with empty 
column names mixed with real column names.

> Exception that the header contains duplicate names when the column names are 
> empty.
> -----------------------------------------------------------------------------------
>
>                 Key: CSV-121
>                 URL: https://issues.apache.org/jira/browse/CSV-121
>             Project: Commons CSV
>          Issue Type: Bug
>            Reporter: Sebastian Hardt
>
> When having a header like a,,c,d,, an IllegalArgumentException("The header 
> contains duplicate names: " +Arrays.toString(header) is thrown because empty 
> header names are treated as a header with name. I sended in a pullrequest at 
> github: https://github.com/apache/commons-csv/pull/2



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to