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

datalake/avro: fixed encoding decimal values #24113

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

mmaslankaprv
Copy link
Member

@mmaslankaprv mmaslankaprv commented Nov 13, 2024

In Java BigInteger.toByteArray() method is used to encode Avro decimals the method returns an array where the first element is the most significant byte of the encoded decimal. This commit fixes Redpanda Avro Bigdecimal encoding.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

  • none

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Nov 13, 2024

rockwotj
rockwotj previously approved these changes Nov 13, 2024
src/v/iceberg/avro_decimal.h Outdated Show resolved Hide resolved
andrwng
andrwng previously approved these changes Nov 14, 2024
Copy link
Contributor

@andrwng andrwng left a comment

Choose a reason for hiding this comment

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

Nice find!

@vbotbuildovich
Copy link
Collaborator

the below tests from https://buildkite.com/redpanda/redpanda/builds/58045#0193294e-c2d6-4e62-932c-6a62350ab24b have failed and will be retried

gtest_raft_rpunit

In Java `BigInteger.toByteArray()` method is used to encode Avro
decimals the method returns an array where the first element is the most
significant byte of the encoded decimal. This commit fixes Redpanda Avro
Bigdecimal encoding.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
Copy link
Contributor

@rockwotj rockwotj left a comment

Choose a reason for hiding this comment

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

lgtm

@mmaslankaprv mmaslankaprv merged commit 0ea6197 into redpanda-data:dev Nov 14, 2024
16 checks passed
@mmaslankaprv mmaslankaprv deleted the avro-decimal branch November 14, 2024 15:07
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.

4 participants