fix: precision scaling behaviour with time64 conversions#1131
Merged
Conversation
Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
joe-clickhouse
approved these changes
Jan 28, 2026
This was referenced Jan 29, 2026
jgao54
added a commit
to PeerDB-io/peerdb
that referenced
this pull request
Feb 4, 2026
Bug-fix has been made upstream to return the correct ScanType so we can remove this workaround. ~Waiting to see if we could also get [the other fix ](ClickHouse/ch-go#1131 on precision as well.~ Looks like both changes are in (clickhouse-go & ch-go).
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
fix: precision scaling behaviour with time64 conversions
Related to bug reported in clickhouse-go repo
ClickHouse/clickhouse-go#1757
Basically we have scale the underlying Time64 precision (
ms,usorns) to the Column type. Otherwise if we store all the values as nano seconds and sending123456000nanoseconds to column of typeTime64(6)will treat it as micro seconds.Checklist
Delete items not relevant to your PR: