lance-format / lance-format/lance
Blob physical projection misreads empty non-null values
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
Problem
Blob columns can be misread when scanning with physical projection / binary blob handling if the column contains an empty but non-null blob value (b""). Empty blobs are encoded with position == 0 and size == 0, which can be confused with rows that have out-of-line blob data in the decode paths.
There is also a related lower-level scheduler contract issue: empty byte ranges should return an empty Bytes entry in result order, but the scheduler reassembly logic can drop empty ranges because empty intervals do not overlap any coalesced request.
Impact
After the first empty blob, subsequent blob values can be read back as empty or the scan can fail due to byte/result misalignment.
Reproduction shape
A blob column with values like:
- non-empty blob
- empty non-null blob
- non-empty blob
- null
- non-empty blob
Then scan it as binary with blob_handling="all_binary".
Expected
The scan should preserve empty non-null blobs, nulls, and all following non-empty blob payloads in order.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the physical projection and binary blob decode paths, then inspect the scheduler reassembly logic for how empty byte ranges are represented and ordered. Reproduce the listed non-empty, empty, null, and non-empty sequence with blob_handling="all_binary"; done means empty non-null blobs, nulls, and subsequent payloads remain aligned, while empty ranges produce empty Bytes entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100