Skip to content

feat(java): support multi-bases for writing database#5450

Merged
majin1102 merged 2 commits intolance-format:mainfrom
ddupg:feat/java-multi-base-writedataset
Dec 16, 2025
Merged

feat(java): support multi-bases for writing database#5450
majin1102 merged 2 commits intolance-format:mainfrom
ddupg:feat/java-multi-base-writedataset

Conversation

@ddupg
Copy link
Copy Markdown
Contributor

@ddupg ddupg commented Dec 10, 2025

No description provided.

@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.

@github-actions github-actions Bot added enhancement New feature or request java labels Dec 10, 2025
@ddupg ddupg force-pushed the feat/java-multi-base-writedataset branch from 11d3d4d to 420ff3d Compare December 11, 2025 02:15
@ddupg
Copy link
Copy Markdown
Contributor Author

ddupg commented Dec 11, 2025

Please @jaystarshot @jackye1995 help review this

@ddupg ddupg force-pushed the feat/java-multi-base-writedataset branch from 3cb8bde to f19733b Compare December 11, 2025 06:38
Copy link
Copy Markdown
Contributor

@majin1102 majin1102 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, left some comments.

Please take a look

Comment thread java/lance-jni/Cargo.lock
"arrow-buffer",
"arrow-cast",
"arrow-data",
"arrow-ord",
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.

Is this unnecessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The previous PR updated the Cargo.lock files in rust and python, but omitted java. When I executed the cargo build command, it triggered an automatic update.

Java Cargo.lock in main branch has now been updated, and I have rebased to solve this.

Comment thread java/lance-jni/src/utils.rs Outdated
.map(|v| std::time::Duration::from_secs(v as u64))
.unwrap_or_else(|| std::time::Duration::from_secs(10));

env.get_optional(initial_bases, |env, opt_obj| {
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.

I think this block works well.
I wonder if we could use import_vec and make an FromJObjectWithEnv impl for BasePath which is easy to reuse in other cases. there's also a IntoJava for transforming. But I guess we don't need that yet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion

}

@Test
public void testCreateAndRead() throws Exception {
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.

Wondering if testCreateMode is better

}

@Test
public void testIsDatasetRootFlag() throws Exception {
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.

Wondering if we could merge testIsDatasetRootFlag and testTargetByPathUri into the testOperation pattern tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The content of these two tests overlaps, I have merged them.

Change-Id: I784b43b8bd903a122544043ebdce04a1106ba0ec
Change-Id: Ie42278965be810fd4d01036ff7cf1c98d74102c2
@ddupg ddupg force-pushed the feat/java-multi-base-writedataset branch from 759e95f to 9f98d04 Compare December 12, 2025 07:14
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, @majin1102 any further comments?

@majin1102
Copy link
Copy Markdown
Contributor

looks good to me, @majin1102 any further comments?

good to go

@majin1102 majin1102 merged commit 163d6cd into lance-format:main Dec 16, 2025
7 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
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.

3 participants