ClickHouse / clickhouse-java

ClickHouse Java Clients & JDBC Driver
https://clickhouse.com
Apache License 2.0
1.45k stars 535 forks source link

[client-v2] POJO reader #1794

Closed chernser closed 2 months ago

chernser commented 2 months ago

Summary

In most cases data is read into DTO objects - custom application POJOs. When dataset is big it may be a significant overhead if data is read into internal storage or buffer then copied to a DTO. This PR implements reader using similar to insert API approach:

Checklist

Delete items not relevant to your PR:

chernser commented 2 months ago

POJO reader is promising if we would eliminate reflection calls. I've compared to the "classic" approach thru binary ready and it faster then POJO + objects pool. May be something is hiding from me.

sonarcloud[bot] commented 2 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
72.3% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint