-
Notifications
You must be signed in to change notification settings - Fork 164
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
Fix Array of low cardinality types serialization/deserialization #173
Fix Array of low cardinality types serialization/deserialization #173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, but not yet ready to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
My app is still crashing after this merge, let me see which is the issue. |
I found the issue, it will not work if the array of Array(LowCardinality(String)) is empty. For example (the last value is an empty array): const auto testData = std::vector<std::vectorstd::string> { |
Context
Array of LowCardinality serialization/deserialization was broken as reported in #140. Issue was that clickhouse-cpp was serializing/deserializing the array offsets before the lowcardinality key_version and Clickhouse was expecting it to come after the key_version.
Solution was to implement a prefix, body and suffix serialization/deserialization approach similar to what can be found in Clickhouse/NativeWriter.
Changes
Testing
Closes