ClickHouse / clickhouse-go

Golang driver for ClickHouse
Apache License 2.0
2.82k stars 546 forks source link

unnecessary date checking #1294

Open handgunman opened 1 month ago

handgunman commented 1 month ago

This module does a check that is not needed.

https://github.com/ClickHouse/clickhouse-go/blob/71347774889eb5c5de9549423fba341518440742/lib/column/date_helpers.go#L45

Clickhouse allows insertion of data earlier than 1900. A conversion to the minimum date for the field type is performed.

https://fiddle.clickhouse.com/fa9e74d6-f107-4d0f-8446-04974d5f6f11

Moreover, a similar check is not performed for the field type Date.

gogingersnap777 commented 1 month ago

@jkaflik I believe the linked PR removes the unnecessary checks.