Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds extended ClickHouse type support to the EFCore.ClickHouse provider by introducing new relational type mappings and expanding the type-mapping source, with accompanying integration/unit tests and README updates.
Changes:
- Added type mappings for arrays (
T[]/List<T>), maps (Dictionary<K,V>), tuples (Tuple<>/ValueTuple<>),TimeSpan(Time/Time64),IPAddress(IPv4/IPv6), big integers (Int128/256,UInt128/256viaBigInteger), and C# enums (string-based). - Enhanced store-type parsing (unwrap
Nullable(...)/LowCardinality(...), handle container/variant store types) and mapping resolution inClickHouseTypeMappingSource. - Added extensive integration tests (Testcontainers) + unit tests for type mapping source behavior; updated README “Supported Types”.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| test/EFCore.ClickHouse.Tests/ExtendedTypeMappingTests.cs | Adds integration + unit tests for newly supported types and wrapper parsing. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ListToArrayConverter.cs | Introduces List↔Array value converter for List<T> array mappings. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseTupleTypeMapping.cs | Adds tuple mapping and driver tuple→ValueTuple conversion + literal generation. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseTimeSpanTypeMapping.cs | Adds Time/Time64 mapping and SQL literal generation for TimeSpan. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseMapTypeMapping.cs | Adds Map(K,V) mapping, comparer, and SQL literal generation. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseIPAddressTypeMapping.cs | Adds IPv4/IPv6 mapping for IPAddress. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseEnumTypeMapping.cs | Adds enum-to-string mapping using EnumToStringConverter<>. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseBigIntegerTypeMapping.cs | Adds BigInteger mapping for Int128/256 + UInt128/256 with conversion logic. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseBigDecimalTypeMapping.cs | Adds ClickHouseDecimal mapping for high-precision decimals + conversion. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseArrayTypeMapping.cs | Adds array/list mapping support (converter-aware) + comparer + literal generation. |
| src/EFCore.ClickHouse/Storage/Internal/ClickHouseTypeMappingSource.cs | Extends store type parsing and mapping resolution for new types/wrappers. |
| README.md | Updates supported types matrix and current feature status. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseArrayTypeMapping.cs
Outdated
Show resolved
Hide resolved
src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseArrayTypeMapping.cs
Outdated
Show resolved
Hide resolved
src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseMapTypeMapping.cs
Outdated
Show resolved
Hide resolved
src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseBigIntegerTypeMapping.cs
Outdated
Show resolved
Hide resolved
src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseTimeSpanTypeMapping.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Adds extended ClickHouse type support to the provider by expanding the type mapping source and introducing new relational type mappings for additional scalar and container types, along with both unit-level literal tests and integration tests against a real ClickHouse container.
Changes:
- Added new relational type mappings for
TimeSpan(Time/Time64),BigInteger(Int128/Int256/UInt128/UInt256),IPAddress(IPv4/IPv6),ClickHouseDecimal(high-precision decimals), plus container typesArray,Map, andTuple. - Extended
ClickHouseTypeMappingSourceparsing to recognize Decimal variants, Time64, enums, wrappers (Nullable,LowCardinality), and container store types. - Added extensive tests: SQL literal generation tests and container-based roundtrip/query tests; updated README supported-types matrix.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/EFCore.ClickHouse.Tests/TypeMappingLiteralTests.cs | Adds literal-generation coverage for new mappings (BigInteger/IP/BigDecimal/Array/Map/Tuple). |
| test/EFCore.ClickHouse.Tests/ExtendedTypeMappingTests.cs | Adds integration tests and mapping-source unit tests for extended types using Testcontainers. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ListToArrayConverter.cs | Introduces List<T> ↔ T[] value converter for array mappings. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseTupleTypeMapping.cs | New tuple mapping supporting both Tuple<> and ValueTuple<> with reader conversion + SQL literal generation. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseTimeSpanTypeMapping.cs | New Time/Time64 (TimeSpan) mapping and literal formatting. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseMapTypeMapping.cs | New Map(K,V) mapping with dictionary comparer and SQL literal generation. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseIPAddressTypeMapping.cs | New IPAddress mapping for IPv4/IPv6 store types. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseEnumTypeMapping.cs | Adds enum CLR mapping via EnumToStringConverter<>. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseDecimalTypeMapping.cs | Adjusts decimal store-type formatting (Decimal(p,s) spacing). |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseBigIntegerTypeMapping.cs | New BigInteger mapping for 128/256-bit integer store types. |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseBigDecimalTypeMapping.cs | New ClickHouseDecimal mapping for high-precision decimals (Decimal128/256 scenarios). |
| src/EFCore.ClickHouse/Storage/Internal/Mapping/ClickHouseArrayTypeMapping.cs | New Array(T) mapping including list support (converter + comparer) and literal generation. |
| src/EFCore.ClickHouse/Storage/Internal/ClickHouseTypeMappingSource.cs | Extends mapping resolution/parsing for wrappers, enums, decimals, time, arrays, maps, tuples, and new scalars. |
| README.md | Updates documented supported types and current status. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
No description provided.