Issue with numerical properties using Avatica JDBC driver

Hi,

When I send a query via JDBC driver with a numerical property (eg. numParallelCombineThreads), I get a ClassCastException.

This is an example of how I send the query with context property :

val properties = new Properties()
properties.setProperty("numParallelCombineThreads", "4")
val connection = DriverManager.getConnection(url, properties)
val statement = connection.createStatement()
val resultSet = statement.executeQuery(query)

and the response I get

Exception in thread "main" org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while executing SQL "select caseid from "2a03cee0-2511-4ee2-b2e9-0068527fc437" group by caseid": Remote driver error: RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

Requests with string and boolean properties are processed successfully, the problem arise only with numerical values.

Is there a parameter or a configuration missing ?

Thanks - Charles

Relates to Apache Druid 0.21.1 and Avatica 1.18.0

I haven’t been able to try it on my system, but does removing the quotes make a difference? I was looking in the docs for an example but didn’t come up with anything…

@petermarshallio or @Ben_Krug Any ideas?

The setProperty method only takes String in arguments

public synchronized Object setProperty(String var1, String var2)

I also tried with put method, but I get the same error

public synchronized V put(K var1, V var2)

Might be worth posting a github issue…