Skip to content

BUG: range query leads to incorrect result on boundary #6792

Description

@dentiny

Hi team, I met an issue when I was doing a range query on ds, repro script

>>> import lance
>>> import pyarrow as pa
>>> table = pa.table({"price": pa.array([1.0, 5.0, 10.0, 15.0, 20.0], type=pa.float64())})
>>> ds = lance.write_dataset(table, "/tmp/test_range_bug")
>>> ds.create_scalar_index("price", "BTREE")
>>> result = ds.to_table(filter="price <= 10.0 AND price > 5.0")
>>> print(result)
pyarrow.Table
price: double
----
price: [[5]]
# expect to be [[10]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions