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

Fix serialization regression for varbinary map keys #24226

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

wendigo
Copy link
Contributor

@wendigo wendigo commented Nov 22, 2024

Description

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@wendigo wendigo requested a review from losipiuk November 22, 2024 12:11
@@ -368,8 +369,13 @@ public void encode(JsonGenerator generator, ConnectorSession session, Block bloc
generator.writeStartObject();
for (int i = 0; i < map.getSize(); i++) {
// Field name is always written as String for backward compatibility,
// only value is properly encoded.
generator.writeFieldName(mapType.getKeyType().getObjectValue(session, keyBlock, offset + i).toString());
// (except for VarbinaryType where we encode it as Base64 representation of its bytes)
Copy link
Member

@losipiuk losipiuk Nov 22, 2024

Choose a reason for hiding this comment

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

nit: key/value (not field name/value) would be better nomenclature

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's called field name in jackson, hence the name

@wendigo wendigo force-pushed the serafin/varbinary-map branch from bbe3021 to 818cd05 Compare November 22, 2024 14:41
@wendigo wendigo merged commit 3ece464 into master Nov 22, 2024
4 of 12 checks passed
@wendigo wendigo deleted the serafin/varbinary-map branch November 22, 2024 14:42
@github-actions github-actions bot added this to the 466 milestone Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants