Skip to content
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

Does clickhouse jdbc preparedstatement support set timestamp with nanoseconds? #709

Closed
KaimingWan opened this issue Aug 27, 2021 · 3 comments · Fixed by #747
Closed

Does clickhouse jdbc preparedstatement support set timestamp with nanoseconds? #709

KaimingWan opened this issue Aug 27, 2021 · 3 comments · Fixed by #747
Labels
Milestone

Comments

@KaimingWan
Copy link

clickhouse jdbc version: 0.3.1

The column type is datetime64(6) in my clickhouse table. I use the following code to set timestamp value. When I execute query I find the precision is not correct. Expected value is '2021-09-01 00:00:00.123456' and the actually value is '2021-09-01 00:00:00.123'.

value = '2021-09-01 00:00:00.123456'
pstmt.setObject(i, value);
@zhicwu zhicwu added the bug label Aug 30, 2021
@zhicwu zhicwu added this to the 0.3.2 Release milestone Aug 30, 2021
@zhicwu
Copy link
Contributor

zhicwu commented Aug 30, 2021

Sorry it does not work well at this point. Please refer to discussion in #608.

@KaimingWan
Copy link
Author

@zhicwu Thanks, I will pay attention to the latest clickhouse driver.

@zhicwu zhicwu added the module-jdbc JDBC driver label Oct 6, 2021
@zhicwu zhicwu linked a pull request Nov 29, 2021 that will close this issue
18 tasks
@zhicwu
Copy link
Contributor

zhicwu commented Dec 29, 2021

Now it works in 0.3.2, but please consider to use setObject and LocalDateTime for better performance.

@zhicwu zhicwu closed this as completed Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants