Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 55982 invoked from network); 30 Oct 2009 06:33:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Oct 2009 06:33:22 -0000 Received: (qmail 57883 invoked by uid 500); 30 Oct 2009 06:33:22 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 57867 invoked by uid 500); 30 Oct 2009 06:33:22 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 57645 invoked by uid 99); 30 Oct 2009 06:33:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 06:33:21 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 06:33:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7EC20234C052 for ; Thu, 29 Oct 2009 23:32:59 -0700 (PDT) Message-ID: <340886082.1256884379518.JavaMail.jira@brutus> Date: Fri, 30 Oct 2009 06:32:59 +0000 (UTC) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2374) UNION PROBLEM WITH PARENTHESIS In-Reply-To: <15209127.1172275745510.JavaMail.jira@brutus> 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/DERBY-2374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771838#action_12771838 ] Mamta A. Satoor commented on DERBY-2374: ---------------------------------------- I am planning to pursue a possible fix by pushing down consumption and from rule. Right now, the rule is ::= And within grammar chain, we check for UNION clause which is little too early because has not been consumed yet. I am working on it right now. Hopefully it will lead to a solution. If anyone sees anything wrong with this approach, please let me know. > UNION PROBLEM WITH PARENTHESIS > ------------------------------ > > Key: DERBY-2374 > URL: https://issues.apache.org/jira/browse/DERBY-2374 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.1.3.3, 10.2.2.0, 10.3.3.1, 10.4.2.1, 10.5.3.1, 10.6.0.0 > Reporter: Kenneth Gee > Priority: Minor > > The following query shows the error using the Derby demo toursDB: > SELECT FLIGHT_ID , SEGMENT_NUMBER , ARRIVE_TIME > FROM ( > (SELECT HW.FLIGHT_ID , HW.SEGMENT_NUMBER , HW.ARRIVE_TIME FROM FLIGHTS HW) > UNION > (SELECT SW.FLIGHT_ID , SW.SEGMENT_NUMBER , SW.ARRIVE_TIME FROM FLIGHTS SW) > ) SRC; > ERROR 42X01: Syntax error: Encountered "UNION" at line 4, column 12. > The following query works: > SELECT FLIGHT_ID , SEGMENT_NUMBER , ARRIVE_TIME > FROM ( > SELECT HW.FLIGHT_ID , HW.SEGMENT_NUMBER , HW.ARRIVE_TIME FROM FLIGHTS HW > UNION > SELECT SW.FLIGHT_ID , SW.SEGMENT_NUMBER , SW.ARRIVE_TIME FROM FLIGHTS SW > ) SRC; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.