Hi all,

we would like to use the IN operator with a single array/list argument. 

SELECT … WHERE COL IN(?)

Avatica supports setting array parameters using

ps.setArray(1, ps.getConnection().createArrayOf("VARCHAR", new Object[]{"VAL1", 
"VAL2"}))

Unfortunately calcite optimizes the query to (when the column COL is of type 
VARCHAR)

SELECT … WHERE COL = (CAST ? AS VARCHAR)

which evaluates to

SELECT … WHERE COL = '[VAL1,VAL2]'

which will obviously return nothing.

Is there a way to fix this?

Kind Regards
Ulrich

Reply via email to