This PR implement conversion between different number types. Today client API (readers) allow to get column value only in the type it is defined in a DB. It is very inconvenient because requires to follow schema very strictly. So this PR relaxes this rule and lets to:
read a value of a number column as number with bigger range than it is defined in DB- 'int8' as int, int32 as long.
read a value of a number column as number with smaller range than it is defined in DB if actual value fits it - int32 value like 1000 can be read as short but not as byte.
Summary
This PR implement conversion between different number types. Today client API (readers) allow to get column value only in the type it is defined in a DB. It is very inconvenient because requires to follow schema very strictly. So this PR relaxes this rule and lets to:
int
,int32
aslong
.int32
value like1000
can be read asshort
but not asbyte
.Closes: https://github.com/ClickHouse/clickhouse-java/issues/1852
Checklist
Delete items not relevant to your PR: