Skip to content

Comments

feat(java): row format supports Optional<T>#2254

Merged
chaokunyang merged 1 commit intoapache:mainfrom
stevenschlansker:optional-type
May 27, 2025
Merged

feat(java): row format supports Optional<T>#2254
chaokunyang merged 1 commit intoapache:mainfrom
stevenschlansker:optional-type

Conversation

@stevenschlansker
Copy link
Contributor

What does this PR do?

Support Optional<T> in java row format
Stored as an inline nullable field - so this implementation chooses not to differentiate between (Optional) null and Optional.empty() and always deserialize as empty.

Does this PR introduce any user-facing change?

New type supported - docs updated

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

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

This looks great and elegant !

@chaokunyang chaokunyang merged commit 8fc076c into apache:main May 27, 2025
50 checks passed
@stevenschlansker stevenschlansker deleted the optional-type branch May 27, 2025 16:49
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