Skip to content

Conversation

@faridmehrhesam
Copy link

@faridmehrhesam faridmehrhesam commented Nov 14, 2025

Summary

This PR introduces initial support for ClickHouse Interval types, beginning with IntervalNanosecond.
Before implementing the full family of interval types, I’d like to get early feedback to ensure that the approach, structure, and overall direction align with the project’s standards.

What’s Included

  • Parsing and serialization support for IntervalNanosecond.
  • Initial unit tests covering the new type.

Let me know about the approach, code quality, test coverage, and anything else that should be included before extending support to all interval types — and after the full implementation I will follow the version-update instructions accordingly

Checklist

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG

@CLAassistant
Copy link

CLAassistant commented Nov 14, 2025

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ClickHouse.Driver/Types/IntervalType.cs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@alex-clickhouse
Copy link
Collaborator

Thanks for this!

The docs say the interval should be unsigned, but some quick tests show that is not actually the case, will have to investigate that a bit.

Adding the rest of the interval types would be useful as well, maybe with a common base class and then just multiplying the TimeSpan by some factor?

@faridmehrhesam
Copy link
Author

Thanks for the feedback. I’ll continue the implementation and review the docs to stay aligned.

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.

3 participants