tajo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blrunner <...@git.apache.org>
Subject [GitHub] tajo pull request: TAJO-1793: result row count unmatched for UNION...
Date Mon, 07 Mar 2016 03:50:15 GMT
Github user blrunner commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/965#discussion_r55160104
  
    --- Diff: tajo-core/src/main/java/org/apache/tajo/querymaster/Query.java ---
    @@ -402,6 +403,39 @@ public QueryState getSynchronizedState() {
         }
       }
     
    +  public boolean hasUnionPlan() throws Exception {
    +    boolean result = false;
    +
    +    // During executing UNION statement or UNION ALL statement, the terminal block doesn't
have join plan and has
    +    // two more child blocks. In above case, Tajo should summarize result TableStats
from all child stages.
    +    ExecutionBlock terminalBlock = plan.getTerminalBlock();
    +    terminalBlock.setPlan(terminalBlock.getPlan());
    +    if (plan.getChilds(terminalBlock.getId()).size() >= 2) {
    +      result = true;
    +    }
    +    return result;
    +  }
    +
    +  public TableStats computeChildResultStats() throws Exception {
    --- End diff --
    
    Moving this method to ``StatisticsUtil`` throws compile error as following:
    ```
    [ERROR] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.apache.tajo:tajo-catalog-common:0.12.0-SNAPSHOT'}'
and 'Vertex{label='org.apache.tajo:tajo-core:0.12.0-SNAPSHOT'}' introduces to cycle in the
graph org.apache.tajo:tajo-core:0.12.0-SNAPSHOT --> org.apache.tajo:tajo-catalog-common:0.12.0-SNAPSHOT
--> org.apache.tajo:tajo-core:0.12.0-SNAPSHOT -> [Help 1]
    ```
    
    It seems that because there is a cyclic reference between tajo-catalog-common module and
tajo-core module. So I improved this method using ``StatisticsUtil.aggregateTableStat`` instead
of moving to ``StatisticsUtil``.
    



---
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.
---

Mime
View raw message