ClickHouse / ClickHouse/clickhouse-go

Supported type conversions in v2

Open
#574 13 comments 0 reactions 1 assignee Claimed by @gingerwizard View on GitHub
enhancement help wanted
Dominant language
Go
Stars
3.3k
Forks
680
Avg merge
2d 3h
Merged PRs (30d)
14

Description

v1 of this driver allowed different types to be passed for a column at insertion type, with this necessary type conversion supported implicitly. Whilst this was convenient, it also allowed the potential loss of precision. Our aspiration for v2 is to support all possible implicit conversions that can be done safely with no precision loss.

Currently, v2 has a number of functional gaps where no precision would be lost and conversion could be safely performed. This issue will be used to track current gaps and the eventual compatibility matrix.

Current support recorded [here](https://github.com/ClickHouse/clickhouse-go/blob/examples/TYPES.md).

Known gaps:

- [x] Insert string to datetime64
- [x] Insert string to datetime
- [x] Insert string to date
- [x] sql.Null* types https://github.com/ClickHouse/clickhouse-go/issues/682

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.