ClickHouse / ClickHouse/ClickHouse.EntityFrameworkCore

DateTimeOffset not supported

Đang mở
#53 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
23
Fork
7
Merge trung bình
14 ngày 3 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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))`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp
Lĩnh vực
databases
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
64/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.