mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
fix(python): guard optional Lance tests and clarify Optimize policy
This commit is contained in:
@@ -357,11 +357,13 @@ class OptimizeOptions(TypedDict, total=False):
|
||||
|
||||
Cleanup controls apply to Embedded convenience Optimize. Durable jobs
|
||||
reject cleanup and separate index-maintenance requests before submission.
|
||||
Unspecified options use Lance's defaults for Embedded tables. Enterprise tables
|
||||
forward ``target_rows_per_fragment``, ``max_source_rows``, ``io_buffer_size``,
|
||||
and ``batch_size`` as per-job SQL options; other non-default settings are
|
||||
unsupported. Omitted Enterprise options inherit table tuning, then
|
||||
deployment/built-in defaults. The server must support these SQL options.
|
||||
Omitted Embedded options inherit ``lance.compaction.*`` table settings, then
|
||||
Lance's built-in defaults. Explicit options override table settings.
|
||||
Enterprise tables forward ``target_rows_per_fragment``, ``max_source_rows``,
|
||||
``io_buffer_size``, and ``batch_size`` as per-job SQL options; other
|
||||
non-default settings are unsupported. Omitted Enterprise options inherit
|
||||
table tuning, then deployment/built-in defaults. The server must support
|
||||
these SQL options.
|
||||
These settings do not change table policy.
|
||||
|
||||
Compaction planning is row based. Lowering ``target_rows_per_fragment``
|
||||
|
||||
@@ -6490,6 +6490,7 @@ async def test_optimize_async_requires_remote(mem_db, mem_db_async):
|
||||
|
||||
|
||||
def test_legacy_compact_files_preserves_data_and_history(tmp_path):
|
||||
pytest.importorskip("lance")
|
||||
table = lancedb.connect(tmp_path).create_table("legacy", [{"id": 1}])
|
||||
table.add([{"id": 2}])
|
||||
with pytest.warns(DeprecationWarning):
|
||||
@@ -6512,6 +6513,7 @@ def test_legacy_optimize_nested_settings_embedded(tmp_path):
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("asynchronous", [False, True])
|
||||
async def test_optimize_inherits_embedded_table_config(tmp_path, asynchronous):
|
||||
pytest.importorskip("lance")
|
||||
seed = lancedb.connect(tmp_path).create_table("policy", [{"id": 1}])
|
||||
seed.add([{"id": 2}])
|
||||
seed.to_lance().update_config(
|
||||
|
||||
Reference in New Issue
Block a user