ClickHouseClient icon indicating copy to clipboard operation
ClickHouseClient copied to clipboard

Extend supported ranges for Date32 and DateTime64 types

Open MaceWindu opened this issue 3 years ago • 0 comments

ClickHouse 22.8 extended value range for Date32 and DateTime64 types to [1900-01-01, 2299-12-31] : https://github.com/ClickHouse/ClickHouse/pull/39425

Currently provider gives following errors:

Date32:

ClickHouseHandledException : The value must be in range [1925-01-01, 2283-11-11].

DateTime64

OverflowException : The value 0xFFB1855D28A1C000 is greater than the maximal value of the type "System.DateTime". It is only possible to read this value as "System.UInt64".
   at Octonica.ClickHouseClient.Types.DateTime64TableColumn.GetValue(Int32 index)
   at Octonica.ClickHouseClient.ClickHouseDataReader.GetFieldValue[T](Int32 ordinal)

PS: Personally I think provider shouldn't validate date/time values and leave it to database.

MaceWindu avatar Aug 20 '22 09:08 MaceWindu