mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
refactor(sdk)!: align Optimize results and data options
BREAKING CHANGE: Replace CompactionResult and SDK compaction option types with OptimizeResult and OptimizeDataOptions/OptimizeDataOverrides, rename compaction_options/compactionOptions to data_options/dataOptions, move the Python result module to lancedb.optimize, and use RewriteDataWithOptions for the Rust action.
This commit is contained in:
@@ -372,11 +372,12 @@ index statistics, and search. For example, `table.delete(where="id = 1")`,
|
||||
|
||||
`create_scalar_index` defaults to `replace=True` on both backends. Both scalar
|
||||
and full-text index creation accept `wait_timeout`. LanceDB Enterprise maintenance methods
|
||||
accept the LanceDB Embedded options: cleanup and compaction warn that they are no-ops.
|
||||
use the same Optimize submission options. `cleanup_old_versions()` remains a
|
||||
warning-only no-op; the former `compact_files()` method is removed.
|
||||
`optimize` submits a durable compaction job and returns once that submission is
|
||||
accepted, not once compaction itself finishes. Pruning and index optimization
|
||||
are not yet supported remotely, so it silently skips them and returns with
|
||||
zeroed pruning statistics. Remote `compaction_options` support per-job
|
||||
zeroed pruning statistics. Remote `data_options` support per-job
|
||||
`target_rows_per_fragment`, `max_source_rows`, `io_buffer_size`, and `batch_size`
|
||||
on compatible servers. Other non-default settings raise `NotImplementedError`
|
||||
before submission; older-server errors are returned without dropping options.
|
||||
@@ -389,7 +390,7 @@ unchanged. Table `enabled` controls automatic scheduling; explicit manual runs
|
||||
remain allowed.
|
||||
|
||||
```python
|
||||
table.optimize(compaction_options={
|
||||
table.optimize(data_options={
|
||||
"target_rows_per_fragment": 100_000,
|
||||
"max_source_rows": 1_000_000,
|
||||
"io_buffer_size": 64 * 1024 * 1024,
|
||||
@@ -408,7 +409,7 @@ code that used the former LanceDB Enterprise-only argument order.
|
||||
|
||||
::: lancedb.table.Table
|
||||
|
||||
::: lancedb.table.CompactionOptions
|
||||
::: lancedb.table.OptimizeDataOptions
|
||||
|
||||
::: lancedb.table.FragmentStatistics
|
||||
|
||||
@@ -1517,7 +1518,7 @@ that accepts `python_bundle.resources`.
|
||||
Caches, hidden paths, symlinks and unsafe paths are excluded. Use `pip=` or
|
||||
`conda=` for platform-specific dependencies and `models=` for large model snapshots.
|
||||
|
||||
::: lancedb.compaction.CompactionResult
|
||||
::: lancedb.optimize.OptimizeResult
|
||||
|
||||
::: lancedb.prewarm.PrewarmDataResult
|
||||
|
||||
|
||||
Reference in New Issue
Block a user