Skip to content

Can't use JSON fields with merge_insert #4831

@ztorchan

Description

@ztorchan

Hi.

https://github.com/lancedb/lance/blob/30dcb5b8eb01e2fd4d05824b908d4174bab549d6/rust/lance/src/dataset/write/merge_insert/exec/write.rs#L361-L373

I found that the metadata of data column field was not copied into the output schema in FullSchemaMergeInsertExec::prepare_stream_schema, resulting in metadata loss.
This results in an error when performing mergeinsert with a json column in the dataset. like:
Query Execution error: Execution error: LanceError(Schema): Attempt to project field by different types: LargeBinary and Utf8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrustRust related tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions