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] Fixed reusing map without creating new nodes #1795

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

chernser
Copy link
Contributor

Summary

Internally data is read into a map that represents a record. clear() was called each time before reading data to protect from stale data from a previous records. However it is not needed because it is always same number of columns are read. Only case with null should be handled correctly to clean up non-null values.

This single change reduces number of Map$Node object by magnitude.

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 chernser added this to the 0.7.0 milestone Aug 31, 2024
@chernser chernser merged commit 12f5edf into main Sep 3, 2024
57 of 59 checks passed
@chernser chernser deleted the clientv2_optimize_reading_record branch September 3, 2024 18:37
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