INFORMATION_SCHEMA.FUNCTION_ALIASES with AggregateFunction throws error

27 views
Skip to first unread message

michaelm

unread,
Aug 27, 2010, 5:06:50 PM8/27/10
to H2 Database
Hi,

User-defined AggregateFunction's throws an error when they are
retrieved from INFORMATION_SCHEMA.FUNCTION_ALIASES.
I get this error with aggregate functions defined in Jaspa spatial
module :

SELECT * FROM INFORMATION_SCHEMA.FUNCTION_ALIASES;
General error: "java.lang.ArrayIndexOutOfBoundsException" [50000-141]
HY000/50000 (Aide)
org.h2.jdbc.JdbcSQLException: General error:
"java.lang.ArrayIndexOutOfBoundsException" [50000-141]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:
327)

It may come from the class org.h2.table.MetaTable
In the case of FUNCTION_ALIASES the method generateRows uses a method
with a different number of arguments in case of AliasFunction and in
case of AggregateFunction.
Just a guess.

Michaël

Thomas Mueller

unread,
Aug 29, 2010, 4:23:08 PM8/29/10
to h2-da...@googlegroups.com
Hi,

Could you post the complete stack trace please?

Regards,
Thomas

michaelm

unread,
Aug 29, 2010, 5:18:19 PM8/29/10
to H2 Database
Hi Thomas,

Here it is :

SELECT * FROM INFORMATION_SCHEMA.FUNCTION_ALIASES;
General error: "java.lang.ArrayIndexOutOfBoundsException:
10" [50000-141] HY000/50000 (Aide)
org.h2.jdbc.JdbcSQLException: General error:
"java.lang.ArrayIndexOutOfBoundsException: 10" [50000-141]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:
327)
at org.h2.message.DbException.get(DbException.java:156)
at org.h2.message.DbException.convert(DbException.java:279)
at org.h2.server.TcpServerThread.sendError(TcpServerThread.java:
187)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:140)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 10
at org.h2.result.Row.getValue(Row.java:59)
at org.h2.table.TableFilter.getValue(TableFilter.java:820)
at
org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:167)
at org.h2.command.dml.Select.queryFlat(Select.java:498)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:579)
at org.h2.command.dml.Query.query(Query.java:241)
at org.h2.command.CommandContainer.query(CommandContainer.java:80)
at org.h2.command.Command.executeQuery(Command.java:132)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:279)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:138)
... 1 more

at org.h2.engine.SessionRemote.done(SessionRemote.java:489)
at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:
152)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:
172)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:151)
at org.h2.server.web.WebApp.getResult(WebApp.java:1316)
at org.h2.server.web.WebApp.query(WebApp.java:1004)
at org.h2.server.web.WebApp$1.next(WebApp.java:967)
at org.h2.server.web.WebApp$1.next(WebApp.java:970)
at org.h2.server.web.WebThread.process(WebThread.java:161)
at org.h2.server.web.WebThread.run(WebThread.java:88)
at java.lang.Thread.run(Unknown Source)

Thanks for your help

Michaël

On 29 août, 22:23, Thomas Mueller <thomas.tom.muel...@gmail.com>
wrote:

Thomas Mueller

unread,
Aug 30, 2010, 2:06:12 PM8/30/10
to h2-da...@googlegroups.com
Hi,

Thanks a lot! You are right, this is a bug (exactly at the place where
you originally wrote). I will fix it in the next release.

Regards,
Thomas

> --
> You received this message because you are subscribed to the Google Groups "H2 Database" group.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to h2-database...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages