Files
lancedb/rust
XuanwoandLH-kevin c85647526c fix: encode JSON in RTE merge_insert (#5353)
Unsharded RTE `merge_insert` reaches the shard writer with JSON text,
which fails the writer’s `LargeBinary` schema check. Encode Arrow JSON
with Lance’s JSONB converter before schema alignment so plain JSON text
and `arrow.json` can both be upserted. Require an explicit JSON
extension on binary input before schema alignment can attach the
destination’s JSONB metadata.

The Python regression tests query the updated and inserted rows after
reopening the table and verify that invalid JSON and unmarked binary
writes leave the existing data intact. Overwrite tests cover schema
replacement in both directions between plain Arrow strings and typed
JSON.

PyArrow 16.1 still raises `Unsupported cast from string_view to utf8`
for `StringView` input on sanitized append and merge paths. Ordinary
UTF-8 RTE upserts and default Arrow append with `StringView` pass on
that version.

The RTE conversion and regression build on LH-kevin’s
[601aebe](https://github.com/lancedb/lancedb/commit/601aebe87771422c47156c94b477ca1ce475de6b).
Related to #4038 and #4035.

Co-authored-by: LH-kevin <186923068+LH-kevin@users.noreply.github.com>

---------

Co-authored-by: LH-kevin <186923068+LH-kevin@users.noreply.github.com>
2026-12-02 12:20:18 +00:00
..