You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2015/04/20 01:31:45 UTC

[GitHub] tajo pull request: TAJO-1573: Fix addColumn bug (fieldsByName shou...

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 <do...@apache.org>
Date:   2015-04-19T23:30:23Z

    TAJO-1573: Fix addColumn bug (fieldsByName should maintain a list per a simple field name)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1573: Fix addColumn bug (fieldsByName shou...

Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/545#discussion_r29146884
  
    --- Diff: tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java ---
    @@ -1200,8 +1200,8 @@ private static EvalNode getNaturalJoinCondition(JoinNode joinNode) {
         Column rightJoinKey;
     
         for (Column common : commons.getColumns()) {
    -      leftJoinKey = leftSchema.getColumn(common.getQualifiedName());
    -      rightJoinKey = rightSchema.getColumn(common.getQualifiedName());
    +      leftJoinKey = leftSchema.getColumn(leftSchema.getColumnIdByName(common.getQualifiedName()));
    --- End diff --
    
    Would you explain why you changed this line?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1573: Fix addColumn bug (fieldsByName shou...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the pull request:

    https://github.com/apache/tajo/pull/545#issuecomment-94496483
  
    `addColumn` function is fixed. `getNaturalJoinCondition`, `verifyProjectedFields`, `verifyIfTargetsCanBeEvaluated` functions are changed together.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1573: Fix addColumn bug (fieldsByName shou...

Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on the pull request:

    https://github.com/apache/tajo/pull/545#issuecomment-94984881
  
    Test cases are also missed in this patch. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1573: Fix addColumn bug (fieldsByName shou...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun closed the pull request at:

    https://github.com/apache/tajo/pull/545


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1573: Fix addColumn bug (fieldsByName shou...

Posted by jihoonson <gi...@git.apache.org>.
Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/545#discussion_r29146506
  
    --- Diff: tajo-catalog/tajo-catalog-common/src/test/java/org/apache/tajo/catalog/TestSchema.java ---
    @@ -147,13 +147,26 @@ public final void testGetColumnString() {
     		assertEquals(col3, schema.getColumn("addr"));
     	}
     
    -	@Test
    -	public final void testAddField() {
    --- End diff --
    
    This test looks to verify Schema.addColumn() with an unqualified column name. Why don't you add a new test instead of modifying an existing test?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request: TAJO-1573: Fix addColumn bug (fieldsByName shou...

Posted by jihoonson <gi...@git.apache.org>.
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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---