lance-format / lance-format/lance

Is there a good way to make max_bytes_per_file used in Stable data storage version

Open
#3,393 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7.1k
Forks
852
Avg merge
3d 18h
Merged PRs (30d)
272

Description

Now, with the Stable data storage version, the max_bytes_per_file option did not affect data file size.

Like the example below, the data file has 9000569 bytes in the file.

import lance
import pyarrow as pa

def generate_large_table():
    data = []
    for i in range(1000000):
        if i % 2 == 0:
            data.append({"name": "Alice", "age": 20})
        else:
            data.append({"name": "Bob", "age": 30})
    table = pa.Table.from_pylist(data)
    return table

table = generate_large_table()

lance.write_dataset(table, "./alice_and_bob.lance", max_bytes_per_file=512)

@westonpace is there a good way to limit the data file size?

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 running the Python reproduction with Lance and PyArrow, then trace how max_bytes_per_file is handled by the Stable data storage path. Confirm the intended size semantics and verify that the generated data files respect the configured limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
data
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.