[
https://issues.apache.org/jira/browse/TAJO-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14502164#comment-14502164
]
ASF GitHub Bot commented on TAJO-1573:
--------------------------------------
GitHub user dongjoon-hyun opened a pull request:
https://github.com/apache/tajo/pull/545
TAJO-1573: Fix addColumn bug (fieldsByName should maintain a list per a
simple field name)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dongjoon-hyun/tajo TAJO-1573
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tajo/pull/545.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #545
----
commit 26a57d20dcd141c4cce05f32cb8cafa688d0ae6c
Author: Dongjoon Hyun <[email protected]>
Date: 2015-04-19T23:30:23Z
TAJO-1573: Fix addColumn bug (fieldsByName should maintain a list per a
simple field name)
----
> Fix addColumn bug (fieldsByName should maintain a list per a simple field
> name)
> -------------------------------------------------------------------------------
>
> Key: TAJO-1573
> URL: https://issues.apache.org/jira/browse/TAJO-1573
> Project: Tajo
> Issue Type: Bug
> Affects Versions: 0.10.0
> Reporter: Dongjoon Hyun
> Assignee: Dongjoon Hyun
> Priority: Trivial
>
> In Schema.java, addColumn should maintain a column list per a simple field
> name. Currently, the maintained list has only the last appended one.
> {code}
> - fieldsByName.put(newCol.getSimpleName(), TUtil.newList(fields.size() -
> 1));
> + if (fieldsByName.containsKey(newCol.getSimpleName())) {
> + fieldsByName.get(newCol.getSimpleName()).add(fields.size() - 1);
> + } else {
> + fieldsByName.put(newCol.getSimpleName(), TUtil.newList(fields.size() -
> 1));
> + }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)