Hi,

I recently updated to jooq 3.4.2 from jooq 3.3.1. One of the query my 
application make now raise a ArrayOutOfBoundsException in the 
Utils.renderAndBind method. The query worked well with jooq 3.3 and it 
still works when I execute it in directly in the database.

Here is the query. Note that the UNLOAD statement is a functionnality of 
Amazon Redshift and I removed the credentials :

UNLOAD ('select replace("t"."search_id", \'"\', \'""\'), 
replace("t"."source_name", \'"\', \'""\'), replace("t"."collection_name", 
\'"\', \'""\'), replace("t"."system_uri_hash", \'"\', \'""\'), 
"t"."click_rank", "t"."datetime", replace("t"."cause2", \'"\', \'""\'), 
replace("t"."custom_metadata_1", \'"\', \'""\'), 
replace("t"."custom_metadata_2", \'"\', \'""\'), 
replace("t"."custom_metadata_3", \'"\', \'""\'), 
replace("t"."custom_metadata_4", \'"\', \'""\'), 
replace("t"."custom_metadata_5", \'"\', \'""\'), 
replace("t"."custom_datas", \'"\', \'""\') from "c_test1"."clicks" as "t" 
where exists (select 1 as "one" from "c_test1"."clicks" where 
("c_test1"."clicks"."datetime" between timestamp \'2014-08-10 00:00:00.0\' 
and timestamp \'2014-09-10 23:59:59.0\' and "t"."search_id" = 
"c_test1"."clicks"."search_id"))') 
TO 's3://fictional/location/' 
WITH CREDENTIALS 'aws_access_key_id=****;aws_secret_access_key=****' 
DELIMITER ',' 
ADDQUOTES;


With jooq 3.4, I get the following stacktrace :

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1069
 at org.jooq.impl.Utils.renderAndBind(Utils.java:1177) ~[jooq-3.4.1.jar:na]
 at org.jooq.impl.SQLTemplate$SQLTemplateQueryPart.accept(SQLTemplate.java:
83) ~[jooq-3.4.1.jar:na]
 at org.jooq.impl.DefaultRenderContext.visit0(DefaultRenderContext.java:445) 
~[jooq-3.4.1.jar:na]
 at org.jooq.impl.AbstractContext.visit0(AbstractContext.java:361) ~[jooq-
3.4.1.jar:na]
 at org.jooq.impl.AbstractContext.visit(AbstractContext.java:136) ~[jooq-3.4
.1.jar:na]
 at org.jooq.impl.SQLQuery.accept(SQLQuery.java:73) ~[jooq-3.4.1.jar:na]
 at org.jooq.impl.DefaultRenderContext.visit0(DefaultRenderContext.java:445) 
~[jooq-3.4.1.jar:na]
 at org.jooq.impl.AbstractContext.visit0(AbstractContext.java:361) ~[jooq-
3.4.1.jar:na]
 at org.jooq.impl.AbstractContext.visit(AbstractContext.java:136) ~[jooq-3.4
.1.jar:na]
 at org.jooq.impl.DefaultRenderContext.render(DefaultRenderContext.java:199) 
~[jooq-3.4.1.jar:na]
 at org.jooq.impl.AbstractQuery.getSQL0(AbstractQuery.java:429) ~[jooq-3.4.
1.jar:na]
 at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:292) ~[jooq-3.4.
1.jar:na]
 at org.jooq.impl.DefaultDSLContext.execute(DefaultDSLContext.java:543) ~[
jooq-3.4.1.jar:na]
 at com.coveo.ua.data.StarSchemaDal.exportTable(StarSchemaDal.java:650) ~[
classes/:na]
 at com.coveo.ua.data.StarSchemaDal.exportClicks(StarSchemaDal.java:674) ~[
classes/:na]
 at com.coveo.ua.core.scheduling.jobs.ExportJob.execute(ExportJob.java:152) 
~[classes/:na]

Thanks,
Jonathan

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to