ClickHouse / ClickHouse/ClickHouse.EntityFrameworkCore
DateTimeOffset not supported
- 主要语言
- C#
- 星标
- 23
- 派生
- 7
- 平均合并
- 14 天 3 小时
- 30 天内合并 PR
- 1
描述
Currently we are using DateTimeOffset in one of our types, and the EntityFrameworkCore Driver does not seem to handle this correclty whereas the ClickHouse.Driver.ADO did:
```
startDate ??= DateTimeOffset.MinValue;
endDate ??= DateTimeOffset.MaxValue;
var res = await _dbContext.Consumptions
.Where(c => c.DateTime >= startDate)
.Where(c => c.DateTime < endDate)
.SumAsync(c => c.Value, cancellationToken: cancellationToken);
```
where DateTime, startDate and endDate are DateTimeOffsets, gives the following error:
`DB::Exception: Cannot convert string '2026-01-01 00:00:00+00:00' to type DateTime64(6): while executing function greaterOrEquals on arguments __table1.DateTime DateTime64(6) DateTime64(size = 0), '2026-01-01 00:00:00+00:00'_String String Const(size = 0, String(size = 1)). (TYPE_MISMATCH) (version 25.8.29.51 (official build))`
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by reproducing the shown Entity Framework Core query using DateTimeOffset values against a ClickHouse DateTime64(6) column, then trace how the provider translates the query parameters. Done means the query executes without the reported TYPE_MISMATCH and preserves the intended date range; the issue does not name specific files or tests to inspect.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 64/100