Skip to content

Fix map_extract backwards compatability#15799

Merged
Mytherin merged 2 commits intoduckdb:v1.2-histrionicusfrom
Maxxen:map-extract-bw
Jan 20, 2025
Merged

Fix map_extract backwards compatability#15799
Mytherin merged 2 commits intoduckdb:v1.2-histrionicusfrom
Maxxen:map-extract-bw

Conversation

@Maxxen
Copy link
Member

@Maxxen Maxxen commented Jan 20, 2025

This PR is a follow-up from #14175 that changed the return value of map_extract and element_at to return a single value from maps by key instead of a list with the value.

This is a good change, but unfortunately It breaks backwards/forwards compatibility for serialized query plans. This PR fixes it by reverting the change to map_extract but instead add a new map_extract_value with the new behavior. It also changes the syntax sugar (e.g. []) to use this new function instead, so the end user still "mostly" sees the new behavior, while the system internally still keeps the same behavior for the actual function.

@Maxxen Maxxen changed the base branch from main to v1.2-histrionicus January 20, 2025 12:37
@Mytherin Mytherin merged commit 1251ef8 into duckdb:v1.2-histrionicus Jan 20, 2025
46 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

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.

2 participants