Skip to content

[FLINK-40355][table] Add new MAP_CONTAINS_KEY function - #28970

Open
VasShabu wants to merge 2 commits into
apache:masterfrom
VasShabu:mapContainsKeyImplementation
Open

[FLINK-40355][table] Add new MAP_CONTAINS_KEY function#28970
VasShabu wants to merge 2 commits into
apache:masterfrom
VasShabu:mapContainsKeyImplementation

Conversation

@VasShabu

Copy link
Copy Markdown
Contributor
  • Yes (please specify the tool below)

Generated-by: Claude Opus 5

@flinkbot

flinkbot commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@VasShabu
VasShabu force-pushed the mapContainsKeyImplementation branch from b7b48ba to fb849a3 Compare August 14, 2026 10:59
try {
return (boolean) equalityHandle.invoke(key, needle);
} catch (Throwable t) {
throw new FlinkRuntimeException(t);

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.

In the past we have not wanted to issue errors in SQL as it would end the job. I suggest we return false and log in this error case. In the error case they are not equal.

description: |
Returns TRUE if the given key exists in the map, FALSE otherwise. Returns NULL if the map is
NULL. A NULL key matches a NULL key in the map. The given key is cast implicitly to the map's
key type where Flink's implicit casting rules allow it; otherwise the call fails validation.

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.

when we say fails validation - I assume we should return false as per my other comment

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