clickhouse-java
clickhouse-java copied to clipboard
[client-v2] fixed number conversion in reader
Summary
This PR make it possible to read columns into wider type. It is not possible with current implementation.
Examples
- column of
int8
can be read asByte
,Short
, ... - column of
int16
can be read asShort
,Integer
. ... but it cannot be read asByte
because can potentially truncate data. In this case application is responsible to do proper conversion.
Closes: https://github.com/ClickHouse/clickhouse-java/issues/1852
Checklist
Delete items not relevant to your PR:
- [x] Unit and integration tests covering the common scenarios were added
- [x] A human-readable description of the changes was provided to include in CHANGELOG
- [ ] For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials