Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[client-v2] POJO reader #1794

Merged
merged 14 commits into from
Sep 10, 2024
Merged

[client-v2] POJO reader #1794

merged 14 commits into from
Sep 10, 2024

Conversation

chernser
Copy link
Contributor

@chernser chernser commented Aug 27, 2024

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:

  • class is registered and set of deserializers is generated
  • each deserializer reads a single field and writes data to POJO

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • 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
Copy link
Contributor Author

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.

@chernser chernser added this to the 0.7.0 milestone Aug 31, 2024
@chernser chernser marked this pull request as ready for review September 5, 2024 21:38
Copy link

sonarcloud bot commented Sep 10, 2024

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

@chernser chernser merged commit f9b0f7a into main Sep 10, 2024
59 of 60 checks passed
@chernser chernser deleted the clientv2_pojo_deserializers branch September 10, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants