ClickHouse / ClickHouse/ClickHouse.EntityFrameworkCore

DateTimeOffset not supported

オープン
#53 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
23
フォーク
7
平均マージ
14日 3時間
マージ済み PR(30日)
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。