lance-format / lance-format/lance

Blob physical projection misreads empty non-null values

Open
#7,598 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.