tajo-issues mailing list archives

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

    https://github.com/apache/tajo/pull/965#discussion_r55160276
  
    --- Diff: tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestUnionQuery.java
---
    @@ -43,658 +49,760 @@ public TestUnionQuery() {
         super(TajoConstants.DEFAULT_DATABASE_NAME);
       }
     
    -  @Test
       /**
        * S (SA U SA) O
        */
    +  @Test
    +  @SimpleTest
       public final void testUnionAll1() throws Exception {
    -    ResultSet res = executeQuery();
    -    assertResultSet(res);
    -    cleanupQuery(res);
    +    Optional<TajoResultSetBase[]> existing = runSimpleTests();
    +    assertTrue(existing.isPresent());
    +    TajoResultSetBase[] resultSet = existing.get();
    +    QueryId qid = resultSet[0].getQueryId();
    +    QueryInfo queryInfo = testingCluster.getMaster().getContext().getQueryJobManager().getFinishedQuery(qid);
    +    TableDesc desc = queryInfo.getResultDesc();
    +    TableStats stats = desc.getStats();
    +    assertEquals(8L, stats.getNumRows().longValue());
    +    assertEquals(96L, stats.getNumBytes().longValue());
    --- End diff --
    
    resultSets should be closed when a test is finished. Use QueryTestCaseBase.closeResultSets().


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