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

Kasper Sørensen commented on METAMODEL-100:
-------------------------------------------

Fix posted for review: https://reviews.apache.org/r/28707/

> AbstracColumn.equals(..) does not take into account the column number
> ---------------------------------------------------------------------
>
>                 Key: METAMODEL-100
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-100
>             Project: Apache MetaModel
>          Issue Type: Bug
>    Affects Versions: 4.3.0-incubating
>            Reporter: Kasper Sørensen
>            Assignee: Kasper Sørensen
>
> I ran into a rare issue the other day: While reading a CSV file that had 
> duplicate column names, doing a subselection on the table caused the values 
> at the position of the duplicated column names to be duplicated values 
> instead of the values really at the records.
> The table layout would be like:
> {code}
> foo,foo,bar
> 1,2,3
> 4,5,6
> {code}
> But while selecting "foo", "foo" and "bar" it emitted records:
> {code}
> 1,1,3
> 4,4,6
> {code}
> After some debugging it seems that the indexOf(...) calls on the 
> DataSetHeader is eventually delegating to an equals(..) call on 
> AbstractColumn. This equals method does not take into account the column 
> number and thus the columns are deemed equal although they are not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to