clickhouse-jdbc not support localDateTime
See original GitHub issueversions: clickhouse-jdbc 0.2.6 with mybatis3.4.5
reappear: set sql param type localDateTime with value(“2021-02-24 00:00:00”)
exception:
Error querying database. Cause: ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 41, host: ******, port: **; Code: 41, e.displayText() = DB::Exception: Cannot parse datetime 2021-02-23T00:00: while converting ‘2021-02-23T00:00’ to DateTime (version 20.8.2.3 (official build))
issues clickhouse-jdbc convert LocalDateTime and LocalDate to string in related code missing formatLocalDate() and formatLocalDateTime() method
public static String formatDate(Date date, TimeZone timeZone) {
getDateFormat().setTimeZone(timeZone);
return getDateFormat().format(date);
}
public static String formatTime(Time time, TimeZone timeZone) {
getDateTimeFormat().setTimeZone(timeZone);
return getDateTimeFormat().format(time);
}
public static String formatTimestamp(Timestamp time, TimeZone timeZone) {
getDateTimeFormat().setTimeZone(timeZone);
return getDateTimeFormat().format(time);
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
v2.5.4 (2021年3月1日) - ClickHouse Native JDBC
变更日志. Implement clickhouse-integration-spark base on Spark Jdbc DataSource API (#170 #184); Batch insert support nullable types in arrays ...
Read more >DateTime | ClickHouse Docs
DateTime. Allows to store an instant in time, that can be expressed as a calendar date and a time of a day. Syntax:...
Read more >ClickHouse / clickhouse-jdbc Download - JitPack
ClickHouseDriver have been deprecated and no longer receive updates. Please use new groupId com.clickhouse and driver com.clickhouse.jdbc.
Read more >jdbc driver - Google Groups
to ClickHouse. +1. It would be great the JDBC driver supports the real-time stats for the queries that are executed. The HTTP API...
Read more >ClickHouse connector — Starburst Enterprise
The supported parameters for the URL are available in the ClickHouse JDBC driver configuration. ... Do not change this setting from the default....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we need to implement a mechanism for type conversion. For now, I’m good to merge the workaround into ResultSet.getObject method. I’ll include this in the pull request for more data types.
It’s available in
develop
branch and it will be released in v0.3.0
. I think I still need a week or two to add more test cases to ensure the driver works well.