fix: Delete stale sync time precision#21049
Merged
Conversation
Contributor
|
🚀 ClickHouse Cloud UI deployed to Vercel: |
murarustefaan
approved these changes
Jul 16, 2025
kodiakhq bot
pushed a commit
that referenced
this pull request
Jul 16, 2025
🤖 I have created a release *beep* *boop* --- ## [7.1.3](plugins-destination-clickhouse-v7.1.2...plugins-destination-clickhouse-v7.1.3) (2025-07-16) ### Bug Fixes * Delete stale sync time precision ([#21049](#21049)) ([52b48c8](52b48c8)) * Don't re-use scan destination between rows scan ([#21058](#21058)) ([bc909ad](bc909ad)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I've been looking at the flaky ClickHouse destination tests to see what's up and noticed this (it doesn't fix the common error we're seeing but a different one).
When using numeric arguments the Go driver defaults to second precision, see https://github.com/ClickHouse/clickhouse-go/blob/6c5ddb38dd2edc841a3b927711b841014759bede/bind.go#L186, losing data while converting the Go time to a string, see below before/after mutation queries.
The solution is to use named args and specify the precision, used
MicroSecondsbecause of https://github.com/cloudquery/plugin-sdk/blob/28a147900315aa9756fc66e7329e3cfbe111e4b5/plugin/testing_write_delete.go#L89Before
After