Skip to content

feat: make on arg optional for merge insert api#5667

Merged
yanghua merged 2 commits intolance-format:mainfrom
yanghua:feat-optional-on
Jan 15, 2026
Merged

feat: make on arg optional for merge insert api#5667
yanghua merged 2 commits intolance-format:mainfrom
yanghua:feat-optional-on

Conversation

@yanghua
Copy link
Copy Markdown
Collaborator

@yanghua yanghua commented Jan 9, 2026

closes: #5652

@github-actions github-actions Bot added enhancement New feature or request python labels Jan 9, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 92.00000% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance/src/dataset/write/merge_insert.rs 92.00% 4 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

looks good to me

def merge_insert(
self,
on: Union[str, Iterable[str]],
on: Optional[Union[str, Iterable[str]]] = None,
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 the new table doesn't have the same column name of source table pk. How do we deal with such case.

This isn’t about the current PR. Just want to know if this is a reasonable constrait.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

If the source table can not find the same column as the PK. When doing the join action in Data Fusion, it would throw an exception.

@yanghua yanghua merged commit 5528bc5 into lance-format:main Jan 15, 2026
38 of 40 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 python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the on parameter of merge insert optional

2 participants