Skip to content

Fix LongEnum deserialization in map keys#15450

Merged
caithagoras merged 1 commit intoprestodb:masterfrom
daniel-ohayon:fix-enum-serde
Nov 20, 2020
Merged

Fix LongEnum deserialization in map keys#15450
caithagoras merged 1 commit intoprestodb:masterfrom
daniel-ohayon:fix-enum-serde

Conversation

@daniel-ohayon
Copy link
Copy Markdown
Contributor

== RELEASE NOTES ==

General Changes
* Fix enum deserialization bug in map keys

return String.class.cast(value);
}
if (signature.isLongEnum()) {
if (value instanceof String) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why would the value be string is the enum is long?

Copy link
Copy Markdown
Contributor Author

@daniel-ohayon daniel-ohayon Nov 18, 2020

Choose a reason for hiding this comment

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

that happens because of JSON serialization – in JSON, keys are always strings (this is why we have a similar check a few lines below – line 138).

@caithagoras caithagoras merged commit 59e88dc into prestodb:master Nov 20, 2020
@daniel-ohayon daniel-ohayon deleted the fix-enum-serde branch November 20, 2020 20:47
@caithagoras caithagoras mentioned this pull request Dec 4, 2020
1 task
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.

3 participants