Skip to content

docs: Update map_extract examples#21360

Merged
Jefffrey merged 1 commit intoapache:mainfrom
nuno-faria:map_extract_doc
Apr 16, 2026
Merged

docs: Update map_extract examples#21360
Jefffrey merged 1 commit intoapache:mainfrom
nuno-faria:map_extract_doc

Conversation

@nuno-faria
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

N/A.

Rationale for this change

While reviewing apache/datafusion-python#1461, I noticed that an example in the map_extract function was wrong:

-- example
SELECT map_extract(MAP {'x': 10, 'y': NULL, 'z': 30}, 'y');
----
[]

-- datafusion
SELECT map_extract(MAP {'x': 10, 'y': NULL, 'z': 30}, 'y');
----
[NULL]

What changes are included in this PR?

  • Fixed the previous example.
  • Also added a new example showing a map_extract on an empty key.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions github-actions bot added documentation Improvements or additions to documentation functions Changes to functions implementation labels Apr 4, 2026
Copy link
Copy Markdown
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

Nice catch

@Jefffrey Jefffrey added this pull request to the merge queue Apr 16, 2026
Merged via the queue into apache:main with commit dbe3395 Apr 16, 2026
32 checks passed
@nuno-faria nuno-faria deleted the map_extract_doc branch April 16, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants