Migration Guides¶
Lance aims to avoid breaking changes when possible. The Python API is stable, and breaking changes are generally
communicated via deprecation warnings for 1–2 months before removal. The Rust public API is still evolving, and any
breaking change across the Rust crates (lance*), Python package (pylance), or Java SDK (org.lance:lance-core)
increments the shared major version number.
Release and Format Versioning¶
- Shared package versions (
1.0.0and later): Following0.39, Lance adopted strict semantic versioning starting at1.0.0. All language SDKs share the same release version. Major versions not listed on this page contained breaking changes limited to narrow or internal Rust traits that do not require migration steps for standard SDK callers (see the GitHub Releases for full changelogs). - On-disk format versions (
2.0,2.1,2.2,2.3): Package release versions are independent of the datasetdata_storage_version. Upgrading the SDK does not rewrite existing tables or force a file format upgrade. See Choosing a data file version for format compatibility details.
11.0.0¶
document_granularity="list_element"requires v3 reader capability, independently of the posting format.
9.0.0¶
-
Unless overridden, newly created FTS indexes use format v2. The code analyzer and
block_size=256require format v3, so readers must support v3 before an index using either option is created. -
To keep new indexes readable by nodes that support at most format v1 or v2, set
format_versionin the index creation parameters, or setLANCE_FTS_FORMAT_VERSIONfor a rollout-wide override. Formats v1 and v2 require the text analyzer andblock_size=128. A code index cannot use format v1 or v2: whenLANCE_FTS_FORMAT_VERSIONis set to1or2, creating a code index fails unlessformat_version=3is passed explicitly, because an explicitformat_versiontakes precedence over the environment variable. -
Operations that maintain an existing FTS index, including append, incremental indexing, optimize, and mem-wal maintained-index flush, preserve its format version.
7.2.0¶
-
The
IndexSegmentBuilderAPI has been removed from Rust, Python, and Java. This API was deprecated by the distributed indexing flow based oncreate_index_uncommitted,merge_existing_index_segments, andcommit_existing_index_segments, but remained in the codebase as a parallel way to plan and publish staged index segments. -
Callers should now publish staged segment outputs directly with
commit_existing_index_segments(...). If multiple staged outputs should be combined into a larger physical segment first, callers should explicitly group those outputs and callmerge_existing_index_segments(...)for each group before committing the final segment list. -
The old builder's
target_segment_bytesautomatic size-based grouping has no direct replacement. Distributed index drivers that used it should choose segment groups themselves, then pass each group tomerge_existing_index_segments(...).
5.0.0¶
-
The default data storage version changed from 2.0 to 2.1. This affects the
column_indicesfield in theDataFileprotobuf message. In 2.0, every field (including non-leaf fields like struct containers and list containers) was assigned a sequential column index. In 2.1, non-leaf fields (unpacked structs, list containers) are assigned-1instead since their validity information is now folded into repetition/definition levels. Only leaf fields and packed structs are assigned column indices.For example, given the schema:
The fields (in depth-first order) are:
Field ID Field 0 x(i32)1 y(list)2 y.item(f32)3 z(struct)4 z.a(i32)In 2.0,
column_indices=[0, 1, 2, 3, 4]— every field gets a column.In 2.1,
column_indices=[0, -1, 1, -1, 2]— non-leaf fields (yandz) get-1. -
This change only affects advanced users who construct
DataFilemessages directly, for example when building operations by hand forDataset.commit. Normal read and write paths are unaffected. -
To opt back to 2.0 format, set
data_storage_version="2.0"when creating a dataset.
1.0.0¶
- The
SearchResultreturned by scalar indices must now output information about null values. Instead of containing aRowIdTreeMap, it now contains aNullableRowIdSet. Expressions that resolve to null values must be included in search results in the null set. This ensures thatNOTcan be applied to index search results correctly.
0.39¶
-
The
lancecrate no longer re-exports utilities fromlance-arrowsuch asRecordBatchExtorSchemaExt. In the short term, if you are relying on these utilities, you can add a dependency on thelance-arrowcrate. However, we do not expectlance-arrowto ever be stable, and you may want to consider forking these utilities. -
Previously, we exported
ErrorandResultas bothlance::Errorandlance::error::Error. We have now reduced this to justlance::Error. We have also removed some internal error utilities (such asOptionExt) from the public API and do not plan on reintroducing these. -
The Python and Rust
dataset::diff_metaAPI has been removed in favor ofdataset::delta, which returns aDatasetDeltathat offers both metadata diff throughlist_transactionsand data diff throughget_inserted_rowsandget_updated_rows. -
Some other minor utilities which had previously been public are now private. It is unlikely anyone was utilizing these. Please open an issue if you were relying on any of these.
-
The
lance-namespaceRust crate now splits intolance-namespacethat contains the mainLanceNamespacetrait and data models, andlance-namespace-implsthat has different implementations of the namespace. TheDirectoryNamespaceandRestNamespaceinterfaces have been refactored to be more user friendly. TheDirectoryNamespacealso now uses Lance ObjectStore for IO instead of directly depending on Apache OpenDAL.