diff --git a/python/python/lancedb/table.py b/python/python/lancedb/table.py index 60f3914c9..925b8ac8b 100644 --- a/python/python/lancedb/table.py +++ b/python/python/lancedb/table.py @@ -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`` diff --git a/python/python/tests/test_table.py b/python/python/tests/test_table.py index 9d561307d..f1c0fe568 100644 --- a/python/python/tests/test_table.py +++ b/python/python/tests/test_table.py @@ -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(