lance-format / lance-format/lance

Merge_insert schema error message confusing when inserting subschemas

Open
#3,634 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7.1k
Forks
852
Avg merge
3d 18h
Merged PRs (30d)
272

Description

This logic here does not provide helpful error message:

https://github.com/lancedb/lance/blob/e0d3179bcc6e6ce5f9c5fcfeb4398789a7005467/rust/lance/src/dataset/write/merge_insert.rs#L387-L397

When checking for subschema, it tries to detect it, but if there is a mismatch, it returns the error message assuming it is the full schema.

Instead, we should be returning an error message from a check for subschema.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in rust/lance/src/dataset/write/merge_insert.rs around lines 387-397 and inspect how subschema mismatches are checked and reported. Reproduce a merge insert involving a subschema, then update the behavior so the resulting error identifies the subschema mismatch rather than treating it as a full-schema error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.