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

fix: Use actual precision for clickhouse data types #2528

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

vrongmeal
Copy link
Contributor

Related: #2527

Signed-off-by: Vaibhav <vrongmeal@gmail.com>
Copy link
Contributor

@tychoish tychoish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good!

crates/datasources/src/clickhouse/convert.rs Outdated Show resolved Hide resolved
crates/pgrepr/src/scalar.rs Show resolved Hide resolved
for val in column {
match val {
Value::DateTime(v) => vals.append_value(
DateTime::<Tz>::try_from(v)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these conversions work across resolutions too? maybe good to have a comment about their rounding/translation strategy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by resolutions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what I'm asking is "what are the cases where the try_from fails? Is it out-of-bounds issues only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, it's only out-of-bound cases.

@vrongmeal vrongmeal requested a review from tychoish January 30, 2024 14:49
Copy link
Contributor

@tychoish tychoish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just have a minor curiosity

@vrongmeal vrongmeal enabled auto-merge (squash) January 31, 2024 07:05
@vrongmeal vrongmeal merged commit b0e49a4 into main Jan 31, 2024
22 checks passed
@vrongmeal vrongmeal deleted the vrongmeal/more-time-precision branch January 31, 2024 07:21
tychoish pushed a commit that referenced this pull request Feb 1, 2024
Related: #2527

---------

Signed-off-by: Vaibhav <vrongmeal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants