-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clickhouse-jdbc not support localDateTime #583
Comments
It's available in |
versions: clickhouse-jdbc developer It also can't convert the dateTime to LocalDateTime ,When I get the response value from clickhouse to java entity in branch of developer exception: issues: Will it be available in v |
Are you expecting to get |
Let met know if I can help. @gao1399677 Note that there isn't any method |
Yes I am get results(entity with LocalDateTime field) from mybatis and calling ResultSet.getObject() in above case |
I am get results(entity with LocalDateTime field) from mybatis and calling ResultSet.getObject() in above case |
when I change the
|
I would love to help, but I do not understand the problem. Your initial post points at some error when passing a |
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. |
Thanks for your help! Mybatis will call the getObject() method in ClickHouseResultSetTest.java ,when set the return entity as LocalDateTime, such as the next example: I add a test toClickHouseResultSetTest.java ,which caused the similar exception
Maybe there need a interface |
@gao1399677, Could you try again using latest code on |
The new developer branch's LocaLDateTime worked will in my project, Thanks for your help! |
versions: 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
The text was updated successfully, but these errors were encountered: