Re: [jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function
Dag, I just resolved this jira entry. thanks, Mamta On Mon, May 10, 2010 at 4:29 PM, Dag H. Wanvik (JIRA) wrote: > > [ > https://issues.apache.org/jira/browse/DERBY-4402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865976#action_12865976 > ] > > Dag H. Wanvik commented on DERBY-4402: > -- > > Can this be resolved? > > >> 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.1.0 >> Reporter: Dag H. Wanvik >> Assignee: Mamta A. Satoor >> Priority: Minor >> Fix For: 10.5.3.1, 10.6.1.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. > >
[jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function
[ https://issues.apache.org/jira/browse/DERBY-4402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865976#action_12865976 ] Dag H. Wanvik commented on DERBY-4402: -- Can this be resolved? > 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.1.0 >Reporter: Dag H. Wanvik >Assignee: Mamta A. Satoor >Priority: Minor > Fix For: 10.5.3.1, 10.6.1.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.
[jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function
[ https://issues.apache.org/jira/browse/DERBY-4402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833918#action_12833918 ] Mamta A. Satoor commented on DERBY-4402: Migrated the change into 10.5 codeline. > 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.
[jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function
[ 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.
[jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function
[
https://issues.apache.org/jira/browse/DERBY-4402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778848#action_12778848
]
Knut Anders Hatlen commented on DERBY-4402:
---
The fix looks fine to me, but could the "if (true)" part be removed in the
following statement?
+ if (visitor.hasNode())
+ {
+ {if (true) throw StandardException.newException(
+ SQLState.LANG_AGGREGATE_IN_GROUPBY_LIST);}
+ }
> 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.
[jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function
[ https://issues.apache.org/jira/browse/DERBY-4402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778671#action_12778671 ] Mamta A. Satoor commented on DERBY-4402: Committed a fix into trunk with revision 881074. The problem was that we were looking directly at the group bu column to be an instance of aggregator and if so, we would throw an exception. This would catch group by (sum(j)) but it would not catch say group by (4+sum(j)). Will work on backporting to 10.5 in few days once I know nothing broke down on trunk. derbyall and junit suite ran fine on my codeline. > 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.
[jira] Commented: (DERBY-4402) Assert failure (sane) or Array out of bounds error (insane) when attempting to GROUP BY accumulator function
[ https://issues.apache.org/jira/browse/DERBY-4402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776751#action_12776751 ] Mamta A. Satoor commented on DERBY-4402: I am looking into this. Will post my findings. > 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 >Reporter: Dag H. Wanvik >Priority: Minor > > 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.
