Can you please post a reproducible test case? A complete SQL statement one could use to reproduce the problem would be great.
On Monday, 9 January 2017 19:45:44 UTC+1, Mike G wrote: > > Stack trace below. The sql itself is massive so I've edited it out. > Presumably the handling could just be improved. > > > org.h2.jdbc.JdbcSQLException: Cannot parse "DATE" constant ; SQL statement: > ... > FROM (SELECT NULL) > WHERE (true) > LIMIT 25000 [22007-193] > at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) > at org.h2.message.DbException.get(DbException.java:168) > at org.h2.value.ValueDate.parse(ValueDate.java:81) > at org.h2.value.Value.convertTo(Value.java:928) > at org.h2.expression.Function.getSimpleValue(Function.java:1084) > at org.h2.expression.Function.getValueWithArgs(Function.java:1195) > at org.h2.expression.Function.getValue(Function.java:590) > at org.h2.expression.ExpressionList.getValue(ExpressionList.java:32) > at > org.h2.expression.JavaAggregate.updateAggregate(JavaAggregate.java:192) > at org.h2.expression.Function.updateAggregate(Function.java:2663) > at org.h2.expression.Alias.updateAggregate(Alias.java:87) > at org.h2.command.dml.Select.queryGroup(Select.java:365) > at org.h2.command.dml.Select.queryWithoutCache(Select.java:650) > at org.h2.command.dml.Query.query(Query.java:341) > at org.h2.command.dml.Query.query(Query.java:309) > at org.h2.expression.Subquery.getValue(Subquery.java:36) > at org.h2.expression.ExpressionList.getValue(ExpressionList.java:32) > at org.h2.expression.Alias.getValue(Alias.java:36) > at org.h2.command.dml.Select.queryFlat(Select.java:549) > at org.h2.command.dml.Select.queryWithoutCache(Select.java:655) > at org.h2.command.dml.Query.query(Query.java:341) > at org.h2.command.dml.Query.query(Query.java:309) > at org.h2.command.dml.Query.query(Query.java:1) > at org.h2.command.CommandContainer.query(CommandContainer.java:112) > at org.h2.command.Command.executeQuery(Command.java:201) > at > org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:110) > ... > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of > range: 0 > at java.lang.String.charAt(String.java:646) > at org.h2.util.DateTimeUtils.parseDateValue(DateTimeUtils.java:305) > at org.h2.value.ValueDate.parse(ValueDate.java:79) > ... 51 more > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
