[
https://issues.apache.org/jira/browse/TAJO-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514147#comment-14514147
]
ASF GitHub Bot commented on TAJO-1573:
--------------------------------------
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/545#discussion_r29146828
--- Diff: tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
---
@@ -485,9 +485,9 @@ public static void verifyProjectedFields(QueryBlock
block, Projectable projectab
for (int i = 0; i < groupingKeyNum; i++) {
Target target = groupbyNode.getTargets()[i];
- if (groupbyNode.getTargets()[i].getEvalTree().getType() ==
EvalType.FIELD) {
+ if (target.getEvalTree().getType() == EvalType.FIELD) {
FieldEval grpKeyEvalNode = target.getEvalTree();
- if
(!groupbyNode.getInSchema().contains(grpKeyEvalNode.getColumnRef())) {
+ if
(!groupbyNode.getInSchema().containsByQualifiedName(grpKeyEvalNode.getColumnRef().getQualifiedName()))
{
--- End diff --
Schema.contains() internally calls the same logic with
containsByQualifiedName(). Would you explain why you changed this line?
> 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
> Attachments: TAJO-1573.Hyun.150420.0.patch.txt,
> TAJO-1573.Hyun.150421.0.patch.txt
>
>
> 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)