[ 
https://issues.apache.org/jira/browse/TAJO-1793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182543#comment-15182543
 ] 

ASF GitHub Bot commented on TAJO-1793:
--------------------------------------

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


> result row count unmatched for UNION ALL 
> -----------------------------------------
>
>                 Key: TAJO-1793
>                 URL: https://issues.apache.org/jira/browse/TAJO-1793
>             Project: Tajo
>          Issue Type: Bug
>          Components: QueryMaster
>    Affects Versions: 0.11.0
>         Environment: single node on Macbook
>            Reporter: Youngkyong Ko
>            Assignee: Jaehwa Jung
>            Priority: Critical
>             Fix For: 0.12.0, 0.11.2
>
>
> In UNION ALL, result record count is presented wrong. 
> default> select * from test1;
> c1
> -------------------------------
> 1
> 2
> (2 rows, 0.027 sec, 4 B selected)
> default> select * from test2;
> c1
> -------------------------------
> 2
> 3
> 4
> (3 rows, 0.011 sec, 6 B selected)
> default> select c1 from test1 union all select c1 from test2;
> Progress: 100%, response time: 0.458 sec
> c1
> -------------------------------
> 1
> 2
> 2
> 3
> 4
> (2 rows, 0.458 sec, 10 B selected)
> ==> SHOULD BE "5 rows" 
> BTW, it is OK in case of  UNION . 
> default> select c1 from test1 union  select c1 from test2;
> Progress: 100%, response time: 0.241 sec
> c1
> -------------------------------
> 2
> 1
> 3
> 4
> (4 rows, 0.241 sec, 8 B selected)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to