Skip to content

bug(python): Merge insert fails when field names are capitalized #2764

@domenicocinque

Description

@domenicocinque

LanceDB version

0.25.2

What happened?

Description

When performing a merge_insert on a table where the key column name includes uppercase characters, a runtime schema error occurs.

Reproduction

import lancedb
import pyarrow as pa

data = pa.table({"aAAAa": [2, 1, 3], "b": ["a", "b", "c"]})
db = lancedb.connect("./.lancedb")
table = db.create_table("my_table", data)

new_data = pa.table({"aAAAa": [2, 3, 4], "b": ["x", "y", "z"]})

res = (
    table.merge_insert("aAAAa")
    .when_matched_update_all()
    .when_not_matched_insert_all()
    .execute(new_data)
)

Error

RuntimeError: lance error: LanceError(Schema): Schema error: No field named aaaaa. 
Valid fields are target."aAAAa", target.b, target._rowid, target._rowaddr.

Are there known steps to reproduce?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions