clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

[client-v2] fixed number conversion in reader

Open chernser opened this issue 4 months ago • 1 comments

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 as Byte, Short, ...
  • column of int16 can be read as Short, Integer. ... but it cannot be read as Byte 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

chernser avatar Oct 08 '24 19:10 chernser