Skip to content

use big endian for compressed complex column values to fit ObjectStrategy expectations#17422

Merged
gianm merged 1 commit intoapache:masterfrom
clintropolis:compressed-complex-use-big-endian
Oct 29, 2024
Merged

use big endian for compressed complex column values to fit ObjectStrategy expectations#17422
gianm merged 1 commit intoapache:masterfrom
clintropolis:compressed-complex-use-big-endian

Conversation

@clintropolis
Copy link
Copy Markdown
Member

Description

Less ambitious fix than #17391, which adds the concept of value byte ordering to ObjectStrategy, this PR instead just hard-codes CompressedComplexColumn to use big endian value buffers in order to fix an issue related to value endianness with some ObjectStrategy implementations when used with the compression added in #16863.

I would still like to do the changes in the other PR at some point because it is a path to allowing all the stuff in segments to use native endian, but there are a lot of additional changes which need to be done first, such as squaring up the things that use ByteBufferWriter/ ObjectStrategy.fromByteBufferWithSize to determine if the header (size) int value endian should match the endian of the object strategy or not, and determining a more elegant way to handle this stuff.

Release note

Fixes an issue related to value buffers being ordered with the incorrect endianness which can cause some complex types, such as approxHistogram to incorrectly be read, and can lead to out of memory exceptions in some cases.


This PR has:

  • been self-reviewed.
  • a release note entry in the PR description.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • been tested in a test Druid cluster.

@gianm gianm merged commit 10208ba into apache:master Oct 29, 2024
@clintropolis clintropolis deleted the compressed-complex-use-big-endian branch October 29, 2024 18:36
jtuglu1 pushed a commit to jtuglu1/druid that referenced this pull request Nov 20, 2024
@clintropolis clintropolis added this to the 31.0.1 milestone Nov 22, 2024
clintropolis added a commit to clintropolis/druid that referenced this pull request Nov 22, 2024
clintropolis added a commit to clintropolis/druid that referenced this pull request Nov 22, 2024
clintropolis added a commit that referenced this pull request Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants