Skip to content

feat(java): simplify the use of optional in jni#5488

Merged
jackye1995 merged 1 commit intolance-format:mainfrom
ddupg:feat/java-get_optional
Dec 17, 2025
Merged

feat(java): simplify the use of optional in jni#5488
jackye1995 merged 1 commit intolance-format:mainfrom
ddupg:feat/java-get_optional

Conversation

@ddupg
Copy link
Copy Markdown
Contributor

@ddupg ddupg commented Dec 16, 2025

This PR made the following changes:

  • Unwrap java Optional inside get_optional , so the callback receives the unwrapped value instead of Optional ; removes repeated get() boilerplate
  • Fix inner_shallow_clone to correctly treat the closure input
  • Replace Optional handling with get_optional to reduce duplication and improve readability

@github-actions github-actions Bot added enhancement New feature or request java labels Dec 16, 2025
Change-Id: I94ff021eefc1260ce7f4afb2cc5063c829b0c59f
@ddupg ddupg force-pushed the feat/java-get_optional branch from e4a6a07 to 978c801 Compare December 16, 2025 08:26
@ddupg ddupg marked this pull request as ready for review December 16, 2025 08:33
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@ddupg
Copy link
Copy Markdown
Contributor Author

ddupg commented Dec 16, 2025

Could please @LuQQiu @jackye1995 @majin1102 help review this?

Copy link
Copy Markdown
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

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

looks good to me!

@jackye1995 jackye1995 merged commit 2e3f36e into lance-format:main Dec 17, 2025
7 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
This PR made the following changes:
- Unwrap java `Optional` inside `get_optional` , so the callback
receives the unwrapped value instead of Optional<T> ; removes repeated
get() boilerplate
- Fix `inner_shallow_clone` to correctly treat the closure input
- Replace `Optional` handling with `get_optional` to reduce duplication
and improve readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants