Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 21582 invoked from network); 17 Nov 2009 19:13:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Nov 2009 19:13:03 -0000 Received: (qmail 55699 invoked by uid 500); 17 Nov 2009 19:13:02 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 55665 invoked by uid 500); 17 Nov 2009 19:13:02 -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 55657 invoked by uid 99); 17 Nov 2009 19:13:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 19:13:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Tue, 17 Nov 2009 19:13:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BCE08234C1F2 for ; Tue, 17 Nov 2009 11:12:39 -0800 (PST) Message-ID: <650727776.1258485159772.JavaMail.jira@brutus> Date: Tue, 17 Nov 2009 19:12:39 +0000 (UTC) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function In-Reply-To: <214729493.1255046551281.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779052#action_12779052 ] Mamta A. Satoor commented on DERBY-4402: ---------------------------------------- You are right, Knut, there is no need for that if true. I got rid of it with revision 881444. The test that I added ran fine with that change. > Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function > ------------------------------------------------------------------------------------------------------------ > > Key: DERBY-4402 > URL: https://issues.apache.org/jira/browse/DERBY-4402 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.5.3.0, 10.6.0.0 > Reporter: Dag H. Wanvik > Assignee: Mamta A. Satoor > Priority: Minor > Fix For: 10.6.0.0 > > > The error checking fails to catch this wrong usage (accumulator function inside a group by column expression. > : > select sum(i) from t group by (4+sum(j)) > : > java.sql.SQLException: Java exception: 'ASSERT FAILED Unexpected Aggregate vector generated by Group By clause: org.apache.derby.shared.common.sanity.AssertFailure'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70) > ... 16 more > Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED Unexpected Aggregate vector generated by Group By clause > at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityManager.java:120) > at org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(SelectNode.java:648) > at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java:227) > at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java:140) > at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(CursorNode.java:249) > at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:319) > at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88) > at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:824) > at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:606) > ... 9 more > The parser has a check against the top node of a "groupingColumnReference" being an aggregator, but fails to "see" inside an expression. > Maybe this check should be made by a visitor in the bind phase instead. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.