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] primitive reading into pojo #1826

Merged
merged 4 commits into from
Oct 1, 2024
Merged

Conversation

chernser
Copy link
Contributor

@chernser chernser commented Sep 17, 2024

Summary

Current implementation reads all values into objects even it can be done using primitive types. It was done to simplify code, but it may be not good for memory consumption.
Current PR:

  • adds methods to read values into primitives
  • updates POJO deserialization code to use these new methods

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:/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@@ -91,6 +89,10 @@ public class QueryTests extends BaseIntegrationTest {

private boolean usePreallocatedBuffers = false;

static {
// System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "DEBUG");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. this is only for current development. but will move into env settings on local

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mzitnik
Copy link
Contributor

mzitnik commented Sep 17, 2024

Do we support POJO with types of Long, Integer, Short, and more class

@chernser
Copy link
Contributor Author

Do we support POJO with types of Long, Integer, Short, and more class

We do but with 1-to-1 match. But with primitives it should be easier to handle.
I will update this part.

@chernser chernser marked this pull request as ready for review September 24, 2024 21:15
Copy link

sonarcloud bot commented Sep 25, 2024

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud

@chernser chernser added this to the 0.7.0 milestone Oct 1, 2024
@chernser chernser merged commit 18a6550 into main Oct 1, 2024
59 of 60 checks passed
@chernser chernser deleted the clientv2_primitive_reader branch October 1, 2024 15:41
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