clickhouse-java
clickhouse-java copied to clipboard
Clickhouse JDBC doesn't support parameter type conversions for java.sql.Date
Describe the bug
In the function ClickHouseValues.convertToSqlExpression, there is a big nested if/else block where clickhouse attempts to convert JDBC parameters to a strings.
In this case, the calling code is passing a java.sql.Date parameter (part of the JDBC spec), but clickhouse has no coversion path for this type. It supports the more modern java.time but ends up taking the default path and just calling
String.valueOf(value)
Steps to reproduce
- N/A - See description. It points out the bug directly.
Expected behaviour
Clickhouse should handle java.sql.Date similar to java.time.LocalDate for setting named parameters in a JDBC query.
Code example
N/A
Error log
N/A
Configuration
Environment
JDBC Driver Version: "com.clickhouse", "clickhouse-jdbc", "0.6.4"
ClickHouse server
N/A