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 1 year 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

Quality Gate Failed Quality Gate failed

Failed conditions
49.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Oct 29 '24 06:10 sonarqubecloud[bot]

@mzitnik I may not tell exact numbers - will try running benchmark tests.

chernser avatar Oct 29 '24 16:10 chernser