Skip to content

fix: Delete stale sync time precision#21049

Merged
erezrokah merged 4 commits intomainfrom
fix/delete_stale_rounding_to_seconds
Jul 16, 2025
Merged

fix: Delete stale sync time precision#21049
erezrokah merged 4 commits intomainfrom
fix/delete_stale_rounding_to_seconds

Conversation

@erezrokah
Copy link
Copy Markdown
Member

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 MicroSeconds because of https://github.com/cloudquery/plugin-sdk/blob/28a147900315aa9756fc66e7329e3cfbe111e4b5/plugin/testing_write_delete.go#L89

Before

image

After

image

@erezrokah erezrokah requested review from a team and murarustefaan July 15, 2025 17:45
@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Jul 15, 2025
@cq-bot
Copy link
Copy Markdown
Contributor

cq-bot commented Jul 15, 2025

@erezrokah erezrokah merged commit 52b48c8 into main Jul 16, 2025
17 checks passed
@erezrokah erezrokah deleted the fix/delete_stale_rounding_to_seconds branch July 16, 2025 14:14
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plugin/destination/clickhouse automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants