Return-Path: X-Original-To: apmail-tajo-issues-archive@minotaur.apache.org Delivered-To: apmail-tajo-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3ECD3182E3 for ; Mon, 7 Mar 2016 02:35:43 +0000 (UTC) Received: (qmail 79919 invoked by uid 500); 7 Mar 2016 02:35:43 -0000 Delivered-To: apmail-tajo-issues-archive@tajo.apache.org Received: (qmail 79876 invoked by uid 500); 7 Mar 2016 02:35:43 -0000 Mailing-List: contact issues-help@tajo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tajo.apache.org Delivered-To: mailing list issues@tajo.apache.org Received: (qmail 79867 invoked by uid 99); 7 Mar 2016 02:35:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2016 02:35:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9E8151804FB for ; Mon, 7 Mar 2016 02:35:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.549 X-Spam-Level: X-Spam-Status: No, score=-3.549 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id kK5RNp982f4A for ; Mon, 7 Mar 2016 02:35:41 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 5FC4F5FB1B for ; Mon, 7 Mar 2016 02:35:41 +0000 (UTC) Received: (qmail 79802 invoked by uid 99); 7 Mar 2016 02:35:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2016 02:35:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B77592C0453 for ; Mon, 7 Mar 2016 02:35:40 +0000 (UTC) Date: Mon, 7 Mar 2016 02:35:40 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@tajo.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TAJO-1793) result row count unmatched for UNION ALL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TAJO-1793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182485#comment-15182485 ] 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_r55156704 --- 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()); --- End diff -- The terminal block doesn't have any plan, so this line doesn't affect to anything. I wonder what is your intention. > 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)