Dongjoon Hyun created TAJO-1573:
-----------------------------------

             Summary: 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)

Reply via email to