deltacat 1.1.38__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- deltacat/__init__.py +150 -12
- deltacat/annotations.py +36 -0
- deltacat/api.py +578 -0
- deltacat/aws/constants.py +0 -23
- deltacat/aws/s3u.py +4 -631
- deltacat/benchmarking/benchmark_engine.py +84 -0
- deltacat/benchmarking/benchmark_report.py +86 -0
- deltacat/benchmarking/benchmark_suite.py +11 -0
- deltacat/benchmarking/conftest.py +22 -19
- deltacat/benchmarking/data/random_row_generator.py +94 -0
- deltacat/benchmarking/data/row_generator.py +10 -0
- deltacat/benchmarking/test_benchmark_pipeline.py +108 -0
- deltacat/catalog/__init__.py +73 -0
- deltacat/catalog/delegate.py +615 -140
- deltacat/catalog/interface.py +404 -81
- deltacat/catalog/main/impl.py +2882 -0
- deltacat/catalog/model/catalog.py +348 -46
- deltacat/catalog/model/properties.py +155 -0
- deltacat/catalog/model/table_definition.py +32 -1
- deltacat/compute/__init__.py +14 -0
- deltacat/compute/compactor/compaction_session.py +97 -75
- deltacat/compute/compactor/model/compact_partition_params.py +75 -30
- deltacat/compute/compactor/model/compaction_session_audit_info.py +23 -30
- deltacat/compute/compactor/model/delta_annotated.py +3 -3
- deltacat/compute/compactor/model/delta_file_envelope.py +3 -1
- deltacat/compute/compactor/model/delta_file_locator.py +3 -1
- deltacat/compute/compactor/model/round_completion_info.py +19 -9
- deltacat/compute/compactor/model/table_object_store.py +3 -2
- deltacat/compute/compactor/repartition_session.py +9 -22
- deltacat/compute/compactor/steps/dedupe.py +11 -4
- deltacat/compute/compactor/steps/hash_bucket.py +6 -6
- deltacat/compute/compactor/steps/materialize.py +15 -9
- deltacat/compute/compactor/steps/repartition.py +12 -11
- deltacat/compute/compactor/utils/io.py +7 -6
- deltacat/compute/compactor/utils/round_completion_reader.py +117 -0
- deltacat/compute/compactor/utils/sort_key.py +9 -2
- deltacat/compute/compactor/utils/system_columns.py +3 -1
- deltacat/compute/compactor_v2/compaction_session.py +13 -14
- deltacat/compute/compactor_v2/deletes/utils.py +3 -3
- deltacat/compute/compactor_v2/model/evaluate_compaction_result.py +0 -1
- deltacat/compute/compactor_v2/model/hash_bucket_input.py +9 -3
- deltacat/compute/compactor_v2/model/merge_file_group.py +5 -2
- deltacat/compute/compactor_v2/model/merge_input.py +28 -9
- deltacat/compute/compactor_v2/private/compaction_utils.py +171 -73
- deltacat/compute/compactor_v2/steps/hash_bucket.py +5 -2
- deltacat/compute/compactor_v2/steps/merge.py +156 -53
- deltacat/compute/compactor_v2/utils/content_type_params.py +17 -6
- deltacat/compute/compactor_v2/utils/delta.py +5 -3
- deltacat/compute/compactor_v2/utils/io.py +10 -3
- deltacat/compute/compactor_v2/utils/merge.py +14 -2
- deltacat/compute/compactor_v2/utils/task_options.py +2 -10
- deltacat/compute/converter/constants.py +9 -0
- deltacat/compute/converter/converter_session.py +298 -0
- deltacat/compute/converter/model/convert_input.py +96 -0
- deltacat/compute/converter/model/convert_input_files.py +78 -0
- deltacat/compute/converter/model/convert_result.py +80 -0
- deltacat/compute/converter/model/converter_session_params.py +144 -0
- deltacat/compute/converter/pyiceberg/catalog.py +78 -0
- deltacat/compute/converter/pyiceberg/overrides.py +263 -0
- deltacat/compute/converter/pyiceberg/update_snapshot_overrides.py +299 -0
- deltacat/compute/converter/steps/convert.py +366 -0
- deltacat/compute/converter/steps/dedupe.py +94 -0
- deltacat/compute/converter/utils/__init__.py +0 -0
- deltacat/compute/converter/utils/convert_task_options.py +132 -0
- deltacat/compute/converter/utils/converter_session_utils.py +175 -0
- deltacat/compute/converter/utils/iceberg_columns.py +87 -0
- deltacat/compute/converter/utils/io.py +203 -0
- deltacat/compute/converter/utils/s3u.py +148 -0
- deltacat/compute/janitor.py +205 -0
- deltacat/compute/jobs/__init__.py +0 -0
- deltacat/compute/jobs/client.py +417 -0
- deltacat/compute/resource_estimation/delta.py +11 -1
- deltacat/constants.py +90 -1
- deltacat/docs/__init__.py +0 -0
- deltacat/docs/autogen/__init__.py +0 -0
- deltacat/docs/autogen/schema/__init__.py +0 -0
- deltacat/docs/autogen/schema/inference/__init__.py +0 -0
- deltacat/docs/autogen/schema/inference/generate_type_mappings.py +687 -0
- deltacat/docs/autogen/schema/inference/parse_json_type_mappings.py +673 -0
- deltacat/env.py +61 -0
- deltacat/examples/__init__.py +0 -0
- deltacat/examples/basic_logging.py +101 -0
- deltacat/examples/compactor/__init__.py +0 -0
- deltacat/examples/compactor/aws/__init__.py +1 -0
- deltacat/examples/compactor/bootstrap.py +863 -0
- deltacat/examples/compactor/compactor.py +373 -0
- deltacat/examples/compactor/explorer.py +473 -0
- deltacat/examples/compactor/gcp/__init__.py +1 -0
- deltacat/examples/compactor/job_runner.py +439 -0
- deltacat/examples/compactor/utils/__init__.py +1 -0
- deltacat/examples/compactor/utils/common.py +261 -0
- deltacat/examples/experimental/__init__.py +0 -0
- deltacat/examples/experimental/iceberg/__init__.py +0 -0
- deltacat/examples/experimental/iceberg/converter/__init__.py +0 -0
- deltacat/examples/experimental/iceberg/converter/beam/__init__.py +0 -0
- deltacat/examples/experimental/iceberg/converter/beam/app.py +226 -0
- deltacat/examples/experimental/iceberg/converter/beam/main.py +133 -0
- deltacat/examples/experimental/iceberg/converter/beam/test_workflow.py +113 -0
- deltacat/examples/experimental/iceberg/converter/beam/utils/__init__.py +3 -0
- deltacat/examples/experimental/iceberg/converter/beam/utils/common.py +174 -0
- deltacat/examples/experimental/iceberg/converter/beam/utils/spark.py +263 -0
- deltacat/examples/experimental/iceberg/iceberg_bucket_writer.py +184 -0
- deltacat/examples/experimental/iceberg/iceberg_reader.py +147 -0
- deltacat/examples/hello_world.py +29 -0
- deltacat/examples/indexer/__init__.py +0 -0
- deltacat/examples/indexer/aws/__init__.py +0 -0
- deltacat/examples/indexer/gcp/__init__.py +0 -0
- deltacat/examples/indexer/indexer.py +163 -0
- deltacat/examples/indexer/job_runner.py +198 -0
- deltacat/exceptions.py +116 -12
- deltacat/experimental/__init__.py +0 -0
- deltacat/experimental/catalog/__init__.py +0 -0
- deltacat/experimental/catalog/iceberg/__init__.py +6 -0
- deltacat/experimental/catalog/iceberg/iceberg_catalog_config.py +26 -0
- deltacat/experimental/catalog/iceberg/impl.py +399 -0
- deltacat/experimental/catalog/iceberg/overrides.py +72 -0
- deltacat/experimental/compatibility/__init__.py +0 -0
- deltacat/experimental/compatibility/backfill_locator_to_id_mappings.py +201 -0
- deltacat/experimental/converter_agent/__init__.py +0 -0
- deltacat/experimental/converter_agent/beam/__init__.py +0 -0
- deltacat/experimental/converter_agent/beam/managed.py +173 -0
- deltacat/experimental/converter_agent/table_monitor.py +479 -0
- deltacat/experimental/daft/__init__.py +4 -0
- deltacat/experimental/daft/daft_catalog.py +229 -0
- deltacat/experimental/storage/__init__.py +0 -0
- deltacat/experimental/storage/iceberg/__init__.py +0 -0
- deltacat/experimental/storage/iceberg/iceberg_scan_planner.py +129 -0
- deltacat/experimental/storage/iceberg/impl.py +739 -0
- deltacat/experimental/storage/iceberg/model.py +713 -0
- deltacat/experimental/storage/iceberg/visitor.py +119 -0
- deltacat/experimental/storage/rivulet/__init__.py +11 -0
- deltacat/experimental/storage/rivulet/arrow/__init__.py +0 -0
- deltacat/experimental/storage/rivulet/arrow/serializer.py +78 -0
- deltacat/experimental/storage/rivulet/dataset.py +745 -0
- deltacat/experimental/storage/rivulet/dataset_executor.py +79 -0
- deltacat/experimental/storage/rivulet/feather/__init__.py +7 -0
- deltacat/experimental/storage/rivulet/feather/file_reader.py +138 -0
- deltacat/experimental/storage/rivulet/feather/serializer.py +35 -0
- deltacat/experimental/storage/rivulet/fs/__init__.py +0 -0
- deltacat/experimental/storage/rivulet/fs/file_provider.py +105 -0
- deltacat/experimental/storage/rivulet/fs/file_store.py +130 -0
- deltacat/experimental/storage/rivulet/fs/input_file.py +76 -0
- deltacat/experimental/storage/rivulet/fs/output_file.py +86 -0
- deltacat/experimental/storage/rivulet/logical_plan.py +105 -0
- deltacat/experimental/storage/rivulet/metastore/__init__.py +0 -0
- deltacat/experimental/storage/rivulet/metastore/delta.py +188 -0
- deltacat/experimental/storage/rivulet/metastore/json_sst.py +105 -0
- deltacat/experimental/storage/rivulet/metastore/sst.py +82 -0
- deltacat/experimental/storage/rivulet/metastore/sst_interval_tree.py +260 -0
- deltacat/experimental/storage/rivulet/mvp/Table.py +101 -0
- deltacat/experimental/storage/rivulet/mvp/__init__.py +5 -0
- deltacat/experimental/storage/rivulet/parquet/__init__.py +7 -0
- deltacat/experimental/storage/rivulet/parquet/data_reader.py +0 -0
- deltacat/experimental/storage/rivulet/parquet/file_reader.py +129 -0
- deltacat/experimental/storage/rivulet/parquet/serializer.py +37 -0
- deltacat/experimental/storage/rivulet/reader/__init__.py +0 -0
- deltacat/experimental/storage/rivulet/reader/block_scanner.py +389 -0
- deltacat/experimental/storage/rivulet/reader/data_reader.py +136 -0
- deltacat/experimental/storage/rivulet/reader/data_scan.py +65 -0
- deltacat/experimental/storage/rivulet/reader/dataset_metastore.py +179 -0
- deltacat/experimental/storage/rivulet/reader/dataset_reader.py +158 -0
- deltacat/experimental/storage/rivulet/reader/pyarrow_data_reader.py +124 -0
- deltacat/experimental/storage/rivulet/reader/query_expression.py +99 -0
- deltacat/experimental/storage/rivulet/reader/reader_type_registrar.py +84 -0
- deltacat/experimental/storage/rivulet/schema/__init__.py +0 -0
- deltacat/experimental/storage/rivulet/schema/datatype.py +128 -0
- deltacat/experimental/storage/rivulet/schema/schema.py +251 -0
- deltacat/experimental/storage/rivulet/serializer.py +40 -0
- deltacat/experimental/storage/rivulet/serializer_factory.py +46 -0
- deltacat/experimental/storage/rivulet/shard/__init__.py +0 -0
- deltacat/experimental/storage/rivulet/shard/range_shard.py +129 -0
- deltacat/experimental/storage/rivulet/writer/__init__.py +0 -0
- deltacat/experimental/storage/rivulet/writer/dataset_writer.py +29 -0
- deltacat/experimental/storage/rivulet/writer/memtable_dataset_writer.py +305 -0
- deltacat/io/__init__.py +13 -0
- deltacat/io/dataset/__init__.py +0 -0
- deltacat/io/dataset/deltacat_dataset.py +91 -0
- deltacat/io/datasink/__init__.py +0 -0
- deltacat/io/datasink/deltacat_datasink.py +207 -0
- deltacat/io/datasource/__init__.py +0 -0
- deltacat/io/datasource/deltacat_datasource.py +579 -0
- deltacat/io/reader/__init__.py +0 -0
- deltacat/io/reader/deltacat_read_api.py +172 -0
- deltacat/logs.py +4 -1
- deltacat/storage/__init__.py +138 -28
- deltacat/storage/interface.py +260 -155
- deltacat/storage/main/__init__.py +0 -0
- deltacat/storage/main/impl.py +3030 -0
- deltacat/storage/model/delta.py +142 -71
- deltacat/storage/model/expression/__init__.py +47 -0
- deltacat/storage/model/expression/expression.py +656 -0
- deltacat/storage/model/expression/visitor.py +248 -0
- deltacat/storage/model/interop.py +24 -0
- deltacat/storage/model/list_result.py +8 -0
- deltacat/storage/model/locator.py +93 -9
- deltacat/storage/model/manifest.py +643 -0
- deltacat/storage/model/metafile.py +1421 -0
- deltacat/storage/model/namespace.py +41 -18
- deltacat/storage/model/partition.py +443 -43
- deltacat/storage/model/scan/__init__.py +0 -0
- deltacat/storage/model/scan/push_down.py +46 -0
- deltacat/storage/model/scan/scan_plan.py +10 -0
- deltacat/storage/model/scan/scan_task.py +34 -0
- deltacat/storage/model/schema.py +3160 -0
- deltacat/storage/model/shard.py +51 -0
- deltacat/storage/model/sort_key.py +210 -13
- deltacat/storage/model/stream.py +215 -80
- deltacat/storage/model/table.py +134 -29
- deltacat/storage/model/table_version.py +333 -46
- deltacat/storage/model/transaction.py +1733 -0
- deltacat/storage/model/transform.py +274 -58
- deltacat/storage/model/types.py +138 -16
- deltacat/storage/util/__init__.py +0 -0
- deltacat/storage/util/scan_planner.py +26 -0
- deltacat/tests/_io/__init__.py +1 -0
- deltacat/tests/_io/reader/__init__.py +0 -0
- deltacat/tests/_io/reader/test_deltacat_read_api.py +0 -0
- deltacat/tests/{io → _io}/test_cloudpickle_bug_fix.py +8 -4
- deltacat/tests/aws/test_s3u.py +2 -31
- deltacat/tests/catalog/data/__init__.py +0 -0
- deltacat/tests/catalog/main/__init__.py +0 -0
- deltacat/tests/catalog/main/test_catalog_impl_namespace_operations.py +130 -0
- deltacat/tests/catalog/main/test_catalog_impl_table_operations.py +1972 -0
- deltacat/tests/catalog/model/__init__.py +0 -0
- deltacat/tests/catalog/model/test_table_definition.py +16 -0
- deltacat/tests/catalog/test_catalogs.py +321 -0
- deltacat/tests/catalog/test_default_catalog_impl.py +12154 -66
- deltacat/tests/compute/compact_partition_multiple_rounds_test_cases.py +21 -21
- deltacat/tests/compute/compact_partition_rebase_test_cases.py +6 -6
- deltacat/tests/compute/compact_partition_rebase_then_incremental_test_cases.py +56 -56
- deltacat/tests/compute/compact_partition_test_cases.py +23 -30
- deltacat/tests/compute/compactor/steps/test_repartition.py +14 -14
- deltacat/tests/compute/compactor/utils/test_io.py +125 -123
- deltacat/tests/compute/compactor/utils/test_round_completion_reader.py +254 -0
- deltacat/tests/compute/compactor_v2/test_compaction_session.py +387 -830
- deltacat/tests/compute/compactor_v2/utils/test_content_type_params.py +70 -57
- deltacat/tests/compute/compactor_v2/utils/test_task_options.py +0 -3
- deltacat/tests/compute/conftest.py +39 -0
- deltacat/tests/compute/converter/__init__.py +0 -0
- deltacat/tests/compute/converter/conftest.py +80 -0
- deltacat/tests/compute/converter/test_convert_session.py +826 -0
- deltacat/tests/compute/converter/utils.py +132 -0
- deltacat/tests/compute/resource_estimation/test_delta.py +88 -104
- deltacat/tests/compute/test_compact_partition_incremental.py +91 -98
- deltacat/tests/compute/test_compact_partition_multiple_rounds.py +79 -97
- deltacat/tests/compute/test_compact_partition_params.py +16 -11
- deltacat/tests/compute/test_compact_partition_rebase.py +63 -93
- deltacat/tests/compute/test_compact_partition_rebase_then_incremental.py +249 -220
- deltacat/tests/compute/test_janitor.py +236 -0
- deltacat/tests/compute/test_util_common.py +726 -46
- deltacat/tests/compute/test_util_constant.py +0 -1
- deltacat/tests/conftest.py +25 -0
- deltacat/tests/daft/__init__.py +0 -0
- deltacat/tests/daft/test_model.py +97 -0
- deltacat/tests/experimental/__init__.py +1 -0
- deltacat/tests/experimental/catalog/__init__.py +0 -0
- deltacat/tests/experimental/catalog/iceberg/__init__.py +0 -0
- deltacat/tests/experimental/catalog/iceberg/test_iceberg_catalog.py +71 -0
- deltacat/tests/experimental/compatibility/__init__.py +1 -0
- deltacat/tests/experimental/compatibility/test_backfill_locator_to_id_mappings.py +582 -0
- deltacat/tests/experimental/daft/__init__.py +0 -0
- deltacat/tests/experimental/daft/test_deltacat_daft_integration.py +136 -0
- deltacat/tests/experimental/storage/__init__.py +0 -0
- deltacat/tests/experimental/storage/rivulet/__init__.py +0 -0
- deltacat/tests/experimental/storage/rivulet/conftest.py +149 -0
- deltacat/tests/experimental/storage/rivulet/fs/__init__.py +0 -0
- deltacat/tests/experimental/storage/rivulet/fs/test_file_location_provider.py +94 -0
- deltacat/tests/experimental/storage/rivulet/reader/__init__.py +0 -0
- deltacat/tests/experimental/storage/rivulet/reader/query_expression.py +80 -0
- deltacat/tests/experimental/storage/rivulet/reader/test_data_scan.py +119 -0
- deltacat/tests/experimental/storage/rivulet/reader/test_dataset_metastore.py +71 -0
- deltacat/tests/experimental/storage/rivulet/schema/__init__.py +0 -0
- deltacat/tests/experimental/storage/rivulet/schema/test_schema.py +241 -0
- deltacat/tests/experimental/storage/rivulet/shard/__init__.py +0 -0
- deltacat/tests/experimental/storage/rivulet/shard/test_range_shard.py +162 -0
- deltacat/tests/experimental/storage/rivulet/test_dataset.py +408 -0
- deltacat/tests/experimental/storage/rivulet/test_manifest.py +67 -0
- deltacat/tests/experimental/storage/rivulet/test_sst_interval_tree.py +232 -0
- deltacat/tests/experimental/storage/rivulet/test_utils.py +124 -0
- deltacat/tests/experimental/storage/rivulet/writer/__init__.py +0 -0
- deltacat/tests/experimental/storage/rivulet/writer/test_dataset_write_then_read.py +343 -0
- deltacat/tests/experimental/storage/rivulet/writer/test_dataset_writer.py +79 -0
- deltacat/tests/experimental/storage/rivulet/writer/test_memtable_dataset_writer.py +75 -0
- deltacat/tests/storage/__init__.py +0 -0
- deltacat/tests/storage/main/__init__.py +0 -0
- deltacat/tests/storage/main/test_main_storage.py +8204 -0
- deltacat/tests/storage/model/__init__.py +0 -0
- deltacat/tests/storage/model/test_delete_parameters.py +21 -0
- deltacat/tests/storage/model/test_expression.py +327 -0
- deltacat/tests/storage/model/test_manifest.py +129 -0
- deltacat/tests/storage/model/test_metafile_io.py +2440 -0
- deltacat/tests/storage/model/test_partition_scheme.py +85 -0
- deltacat/tests/storage/model/test_schema.py +479 -0
- deltacat/tests/storage/model/test_schema_update.py +1925 -0
- deltacat/tests/storage/model/test_shard.py +24 -0
- deltacat/tests/storage/model/test_sort_scheme.py +90 -0
- deltacat/tests/storage/model/test_table_version.py +110 -0
- deltacat/tests/storage/model/test_transaction.py +653 -0
- deltacat/tests/storage/model/test_transaction_history.py +886 -0
- deltacat/tests/test_deltacat_api.py +1064 -0
- deltacat/tests/test_exceptions.py +9 -5
- deltacat/tests/test_utils/filesystem.py +14 -0
- deltacat/tests/test_utils/message_pack_utils.py +54 -0
- deltacat/tests/test_utils/pyarrow.py +50 -26
- deltacat/tests/test_utils/storage.py +256 -4
- deltacat/tests/types/__init__.py +0 -0
- deltacat/tests/types/test_tables.py +104 -0
- deltacat/tests/utils/exceptions.py +22 -0
- deltacat/tests/utils/main_deltacat_storage_mock.py +31 -0
- deltacat/tests/utils/ray_utils/test_dataset.py +123 -5
- deltacat/tests/utils/test_daft.py +124 -34
- deltacat/tests/utils/test_numpy.py +1193 -0
- deltacat/tests/utils/test_pandas.py +1106 -0
- deltacat/tests/utils/test_polars.py +1040 -0
- deltacat/tests/utils/test_pyarrow.py +1107 -258
- deltacat/types/media.py +345 -37
- deltacat/types/partial_download.py +1 -1
- deltacat/types/tables.py +2345 -47
- deltacat/utils/arguments.py +33 -1
- deltacat/utils/daft.py +824 -40
- deltacat/utils/export.py +61 -0
- deltacat/utils/filesystem.py +450 -0
- deltacat/utils/metafile_locator.py +74 -0
- deltacat/utils/numpy.py +118 -26
- deltacat/utils/pandas.py +577 -48
- deltacat/utils/polars.py +759 -0
- deltacat/utils/pyarrow.py +1212 -178
- deltacat/utils/ray_utils/concurrency.py +1 -1
- deltacat/utils/ray_utils/dataset.py +101 -10
- deltacat/utils/ray_utils/runtime.py +56 -4
- deltacat/utils/reader_compatibility_mapping.py +3083 -0
- deltacat/utils/url.py +1325 -0
- deltacat-2.0.0.dist-info/METADATA +1163 -0
- deltacat-2.0.0.dist-info/RECORD +439 -0
- {deltacat-1.1.38.dist-info → deltacat-2.0.0.dist-info}/WHEEL +1 -1
- deltacat/aws/redshift/__init__.py +0 -19
- deltacat/aws/redshift/model/manifest.py +0 -394
- deltacat/catalog/default_catalog_impl/__init__.py +0 -369
- deltacat/compute/compactor/utils/round_completion_file.py +0 -97
- deltacat/compute/merge_on_read/__init__.py +0 -4
- deltacat/compute/merge_on_read/daft.py +0 -40
- deltacat/compute/merge_on_read/model/merge_on_read_params.py +0 -66
- deltacat/compute/merge_on_read/utils/delta.py +0 -42
- deltacat/io/dataset.py +0 -73
- deltacat/io/read_api.py +0 -143
- deltacat/storage/model/delete_parameters.py +0 -40
- deltacat/storage/model/partition_spec.py +0 -71
- deltacat/tests/compute/compactor/utils/test_round_completion_file.py +0 -231
- deltacat/tests/compute/test_util_create_table_deltas_repo.py +0 -397
- deltacat/tests/local_deltacat_storage/__init__.py +0 -1262
- deltacat/tests/local_deltacat_storage/exceptions.py +0 -10
- deltacat/utils/s3fs.py +0 -21
- deltacat-1.1.38.dist-info/METADATA +0 -64
- deltacat-1.1.38.dist-info/RECORD +0 -219
- /deltacat/{aws/redshift/model → benchmarking/data}/__init__.py +0 -0
- /deltacat/{compute/merge_on_read/model → catalog/main}/__init__.py +0 -0
- /deltacat/compute/{merge_on_read/utils → converter}/__init__.py +0 -0
- /deltacat/{io/aws → compute/converter/model}/__init__.py +0 -0
- /deltacat/{io/aws/redshift → compute/converter/pyiceberg}/__init__.py +0 -0
- /deltacat/{tests/io → compute/converter/steps}/__init__.py +0 -0
- /deltacat/tests/{io → _io}/test_file_object_store.py +0 -0
- /deltacat/tests/{io → _io}/test_memcached_object_store.py +0 -0
- /deltacat/tests/{io → _io}/test_ray_plasma_object_store.py +0 -0
- /deltacat/tests/{io → _io}/test_redis_object_store.py +0 -0
- /deltacat/tests/{io → _io}/test_s3_object_store.py +0 -0
- {deltacat-1.1.38.dist-info → deltacat-2.0.0.dist-info/licenses}/LICENSE +0 -0
- {deltacat-1.1.38.dist-info → deltacat-2.0.0.dist-info}/top_level.txt +0 -0
deltacat/catalog/interface.py
CHANGED
@@ -1,31 +1,58 @@
|
|
1
|
-
from typing import Any, Dict, List, Optional,
|
2
|
-
|
3
|
-
import pyarrow as pa
|
1
|
+
from typing import Any, Dict, List, Optional, Union
|
4
2
|
|
3
|
+
from deltacat.storage.model.partition import (
|
4
|
+
Partition,
|
5
|
+
PartitionLocator,
|
6
|
+
PartitionScheme,
|
7
|
+
)
|
5
8
|
from deltacat.catalog.model.table_definition import TableDefinition
|
6
|
-
from deltacat.storage.model.sort_key import
|
9
|
+
from deltacat.storage.model.sort_key import SortScheme
|
7
10
|
from deltacat.storage.model.list_result import ListResult
|
8
|
-
from deltacat.storage.model.namespace import Namespace
|
11
|
+
from deltacat.storage.model.namespace import Namespace, NamespaceProperties
|
12
|
+
from deltacat.storage.model.schema import (
|
13
|
+
Schema,
|
14
|
+
SchemaUpdateOperations,
|
15
|
+
)
|
16
|
+
from deltacat.storage.model.table import TableProperties
|
17
|
+
from deltacat.storage.model.table_version import TableVersionProperties
|
9
18
|
from deltacat.storage.model.types import (
|
10
|
-
|
19
|
+
Dataset,
|
11
20
|
LifecycleState,
|
12
|
-
|
13
|
-
LocalTable,
|
14
|
-
SchemaConsistencyType,
|
21
|
+
StreamFormat,
|
15
22
|
)
|
23
|
+
from deltacat.storage.model.transaction import Transaction
|
16
24
|
from deltacat.types.media import ContentType
|
17
|
-
from deltacat.types.tables import
|
25
|
+
from deltacat.types.tables import (
|
26
|
+
DatasetType,
|
27
|
+
TableWriteMode,
|
28
|
+
)
|
29
|
+
|
30
|
+
|
31
|
+
# catalog functions
|
32
|
+
def initialize(*args, **kwargs) -> Optional[Any]:
|
33
|
+
"""
|
34
|
+
Initializes the data catalog with the given arguments.
|
35
|
+
|
36
|
+
Will return an object containing any state needed for the operation of the catalog. For example,
|
37
|
+
initializing an iceberg catalog will return the underlying native PyIceberg catalog.
|
38
|
+
|
39
|
+
The return value initialize is stored in :class:`deltacat.Catalog` as the "inner" property,
|
40
|
+
and then passed to catalog function invocations as the kwarg "inner"
|
41
|
+
"""
|
42
|
+
raise NotImplementedError("initialize not implemented")
|
18
43
|
|
19
44
|
|
20
45
|
# table functions
|
21
46
|
def write_to_table(
|
22
|
-
data:
|
47
|
+
data: Dataset,
|
23
48
|
table: str,
|
49
|
+
*args,
|
24
50
|
namespace: Optional[str] = None,
|
51
|
+
table_version: Optional[str] = None,
|
25
52
|
mode: TableWriteMode = TableWriteMode.AUTO,
|
26
53
|
content_type: ContentType = ContentType.PARQUET,
|
27
|
-
|
28
|
-
**kwargs
|
54
|
+
transaction: Optional[Transaction] = None,
|
55
|
+
**kwargs,
|
29
56
|
) -> None:
|
30
57
|
"""Write local or distributed data to a table. Raises an error if the
|
31
58
|
table does not exist and the table write mode is not CREATE or AUTO.
|
@@ -33,152 +60,448 @@ def write_to_table(
|
|
33
60
|
When creating a table, all `create_table` parameters may be optionally
|
34
61
|
specified as additional keyword arguments. When appending to, or replacing,
|
35
62
|
an existing table, all `alter_table` parameters may be optionally specified
|
36
|
-
as additional keyword arguments.
|
63
|
+
as additional keyword arguments.
|
64
|
+
|
65
|
+
Args:
|
66
|
+
data: Local or distributed data to write to the table.
|
67
|
+
table: Name of the table to write to.
|
68
|
+
namespace: Optional namespace for the table. Uses default if not specified.
|
69
|
+
table_version: Optional version of the table to write to. If specified,
|
70
|
+
will create this version if it doesn't exist (in CREATE mode) or
|
71
|
+
get this version if it exists (in other modes). If not specified,
|
72
|
+
uses the latest version.
|
73
|
+
mode: Write mode (AUTO, CREATE, APPEND, REPLACE, MERGE, DELETE).
|
74
|
+
content_type: Content type used to write the data files. Defaults to PARQUET.
|
75
|
+
transaction: Optional transaction to append write operations to instead of
|
76
|
+
creating and committing a new transaction.
|
77
|
+
**kwargs: Additional keyword arguments.
|
78
|
+
"""
|
37
79
|
raise NotImplementedError("write_to_table not implemented")
|
38
80
|
|
39
81
|
|
40
82
|
def read_table(
|
41
|
-
table: str,
|
42
|
-
|
43
|
-
|
83
|
+
table: str,
|
84
|
+
*args,
|
85
|
+
namespace: Optional[str] = None,
|
86
|
+
table_version: Optional[str] = None,
|
87
|
+
read_as: DatasetType = DatasetType.DAFT,
|
88
|
+
partition_filter: Optional[List[Union[Partition, PartitionLocator]]] = None,
|
89
|
+
max_parallelism: Optional[int] = None,
|
90
|
+
columns: Optional[List[str]] = None,
|
91
|
+
file_path_column: Optional[str] = None,
|
92
|
+
transaction: Optional[Transaction] = None,
|
93
|
+
**kwargs,
|
94
|
+
) -> Dataset:
|
95
|
+
"""Read a table into a dataset.
|
96
|
+
|
97
|
+
Args:
|
98
|
+
table: Name of the table to read.
|
99
|
+
namespace: Optional namespace of the table. Uses default if not specified.
|
100
|
+
table_version: Optional specific version of the table to read.
|
101
|
+
read_as: Dataset type to use for reading table files. Defaults to DatasetType.DAFT.
|
102
|
+
partition_filter: Optional list of partitions to read from.
|
103
|
+
max_parallelism: Optional maximum parallelism for data download. Defaults to the number of
|
104
|
+
available CPU cores for local dataset type reads (i.e., members of DatasetType.local())
|
105
|
+
and 100 for distributed dataset type reads (i.e., members of DatasetType.distributed()).
|
106
|
+
columns: Optional list of columns to include in the result.
|
107
|
+
file_path_column: Optional column name to add file paths to the result.
|
108
|
+
transaction: Optional transaction to chain this read operation to. If provided, uncommitted
|
109
|
+
changes from the transaction will be visible to this read operation.
|
110
|
+
**kwargs: Additional keyword arguments.
|
111
|
+
|
112
|
+
Returns:
|
113
|
+
Dataset containing the table data.
|
114
|
+
"""
|
44
115
|
raise NotImplementedError("read_table not implemented")
|
45
116
|
|
46
117
|
|
47
118
|
def alter_table(
|
48
119
|
table: str,
|
120
|
+
*args,
|
49
121
|
namespace: Optional[str] = None,
|
122
|
+
table_version: Optional[str] = None,
|
50
123
|
lifecycle_state: Optional[LifecycleState] = None,
|
51
|
-
schema_updates: Optional[
|
124
|
+
schema_updates: Optional[SchemaUpdateOperations] = None,
|
52
125
|
partition_updates: Optional[Dict[str, Any]] = None,
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
126
|
+
sort_scheme: Optional[SortScheme] = None,
|
127
|
+
table_description: Optional[str] = None,
|
128
|
+
table_version_description: Optional[str] = None,
|
129
|
+
table_properties: Optional[TableProperties] = None,
|
130
|
+
table_version_properties: Optional[TableVersionProperties] = None,
|
131
|
+
transaction: Optional[Transaction] = None,
|
132
|
+
**kwargs,
|
59
133
|
) -> None:
|
60
|
-
"""Alter table definition.
|
134
|
+
"""Alter deltacat table/table_version definition.
|
135
|
+
|
136
|
+
Modifies various aspects of a table's metadata including lifecycle state,
|
137
|
+
schema, partitioning, sort keys, description, and properties.
|
138
|
+
|
139
|
+
Args:
|
140
|
+
table: Name of the table to alter.
|
141
|
+
namespace: Optional namespace of the table. Uses default namespace if not specified.
|
142
|
+
table_version: Optional specific version of the table to alter. Defaults to the latest active version.
|
143
|
+
lifecycle_state: New lifecycle state for the table.
|
144
|
+
schema_updates: Schema updates to apply.
|
145
|
+
partition_updates: Partition scheme updates to apply.
|
146
|
+
sort_scheme: New sort scheme.
|
147
|
+
table_description: New description for the table.
|
148
|
+
table_version_description: New description for the table version. Defaults to `table_description` if not specified.
|
149
|
+
table_properties: New table properties.
|
150
|
+
table_version_properties: New table version properties. Defaults to the current parent table properties if not specified.
|
151
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
152
|
+
|
153
|
+
Returns:
|
154
|
+
None
|
155
|
+
|
156
|
+
Raises:
|
157
|
+
TableNotFoundError: If the table does not already exist.
|
158
|
+
TableVersionNotFoundError: If the specified table version or active table version does not exist.
|
159
|
+
"""
|
61
160
|
raise NotImplementedError("alter_table not implemented")
|
62
161
|
|
63
162
|
|
64
163
|
def create_table(
|
65
164
|
table: str,
|
165
|
+
*args,
|
66
166
|
namespace: Optional[str] = None,
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
167
|
+
table_version: Optional[str] = None,
|
168
|
+
lifecycle_state: Optional[LifecycleState] = LifecycleState.ACTIVE,
|
169
|
+
schema: Optional[Schema] = None,
|
170
|
+
partition_scheme: Optional[PartitionScheme] = None,
|
171
|
+
sort_keys: Optional[SortScheme] = None,
|
172
|
+
table_description: Optional[str] = None,
|
173
|
+
table_version_description: Optional[str] = None,
|
174
|
+
table_properties: Optional[TableProperties] = None,
|
175
|
+
table_version_properties: Optional[TableVersionProperties] = None,
|
176
|
+
namespace_properties: Optional[NamespaceProperties] = None,
|
76
177
|
content_types: Optional[List[ContentType]] = None,
|
77
|
-
|
78
|
-
|
79
|
-
**kwargs
|
178
|
+
fail_if_exists: bool = True,
|
179
|
+
transaction: Optional[Transaction] = None,
|
180
|
+
**kwargs,
|
80
181
|
) -> TableDefinition:
|
81
|
-
"""Create an empty table
|
82
|
-
|
182
|
+
"""Create an empty table in the catalog.
|
183
|
+
|
184
|
+
If a namespace isn't provided, the table will be created within the default deltacat namespace.
|
185
|
+
Additionally if the provided namespace does not exist, it will be created for you.
|
186
|
+
|
187
|
+
Args:
|
188
|
+
table: Name of the table to create.
|
189
|
+
namespace: Optional namespace for the table. Uses default namespace if not specified.
|
190
|
+
version: Optional version identifier for the table.
|
191
|
+
lifecycle_state: Lifecycle state of the new table. Defaults to ACTIVE.
|
192
|
+
schema: Schema definition for the table.
|
193
|
+
partition_scheme: Optional partitioning scheme for the table.
|
194
|
+
sort_keys: Optional sort keys for the table.
|
195
|
+
table_description: Optional description of the table.
|
196
|
+
table_version_description: Optional description for the table version.
|
197
|
+
table_properties: Optional properties for the table.
|
198
|
+
table_version_properties: Optional properties for the table version. Defaults to the current parent table properties if not specified.
|
199
|
+
namespace_properties: Optional properties for the namespace if it needs to be created.
|
200
|
+
content_types: Optional list of allowed content types for the table.
|
201
|
+
fail_if_exists: If True, raises an error if table already exists. If False, returns existing table.
|
202
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
203
|
+
|
204
|
+
Returns:
|
205
|
+
TableDefinition object for the created or existing table.
|
206
|
+
|
207
|
+
Raises:
|
208
|
+
TableAlreadyExistsError: If the table already exists and fail_if_exists is True.
|
209
|
+
NamespaceNotFoundError: If the provided namespace does not exist.
|
210
|
+
"""
|
211
|
+
|
83
212
|
raise NotImplementedError("create_table not implemented")
|
84
213
|
|
85
214
|
|
86
215
|
def drop_table(
|
87
|
-
table: str,
|
216
|
+
table: str,
|
217
|
+
*args,
|
218
|
+
namespace: Optional[str] = None,
|
219
|
+
table_version: Optional[str] = None,
|
220
|
+
purge: bool = False,
|
221
|
+
transaction: Optional[Transaction] = None,
|
222
|
+
**kwargs,
|
88
223
|
) -> None:
|
89
|
-
"""Drop a table from the catalog and optionally
|
90
|
-
|
224
|
+
"""Drop a table from the catalog and optionally purges underlying data.
|
225
|
+
|
226
|
+
Args:
|
227
|
+
table: Name of the table to drop.
|
228
|
+
namespace: Optional namespace of the table. Uses default namespace if not specified.
|
229
|
+
table_version: Optional specific version of the table to drop. Defaults to the latest active version.
|
230
|
+
purge: If True, permanently delete the table data. If False, only remove from catalog.
|
231
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
232
|
+
|
233
|
+
Returns:
|
234
|
+
None
|
235
|
+
|
236
|
+
Raises:
|
237
|
+
TableNotFoundError: If the table does not exist.
|
238
|
+
TableVersionNotFoundError: If the table version does not exist.
|
239
|
+
"""
|
91
240
|
raise NotImplementedError("drop_table not implemented")
|
92
241
|
|
93
242
|
|
94
|
-
def refresh_table(
|
95
|
-
|
243
|
+
def refresh_table(
|
244
|
+
table: str,
|
245
|
+
*args,
|
246
|
+
namespace: Optional[str] = None,
|
247
|
+
table_version: Optional[str] = None,
|
248
|
+
transaction: Optional[Transaction] = None,
|
249
|
+
**kwargs,
|
250
|
+
) -> None:
|
251
|
+
"""Refresh metadata cached on the Ray cluster for the given table.
|
252
|
+
|
253
|
+
Args:
|
254
|
+
table: Name of the table to refresh.
|
255
|
+
namespace: Optional namespace of the table. Uses default namespace if not specified.
|
256
|
+
table_version: Optional specific version of the table to refresh. Defaults to the latest active version.
|
257
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
258
|
+
|
259
|
+
Returns:
|
260
|
+
None
|
261
|
+
"""
|
96
262
|
raise NotImplementedError("refresh_table not implemented")
|
97
263
|
|
98
264
|
|
99
265
|
def list_tables(
|
100
|
-
|
266
|
+
*args,
|
267
|
+
namespace: Optional[str] = None,
|
268
|
+
table: Optional[str] = None,
|
269
|
+
transaction: Optional[Transaction] = None,
|
270
|
+
**kwargs,
|
101
271
|
) -> ListResult[TableDefinition]:
|
102
|
-
"""List a page of table definitions.
|
103
|
-
|
272
|
+
"""List a page of table definitions.
|
273
|
+
|
274
|
+
Args:
|
275
|
+
namespace: Optional namespace to list tables from. Uses default namespace if not specified.
|
276
|
+
table: Optional table to list its table versions. If not specified, lists the latest active version of each table in the namespace.
|
277
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
278
|
+
|
279
|
+
Returns:
|
280
|
+
ListResult containing TableDefinition objects for tables in the namespace.
|
281
|
+
"""
|
104
282
|
raise NotImplementedError("list_tables not implemented")
|
105
283
|
|
106
284
|
|
107
285
|
def get_table(
|
108
|
-
table: str,
|
286
|
+
table: str,
|
287
|
+
*args,
|
288
|
+
namespace: Optional[str] = None,
|
289
|
+
table_version: Optional[str] = None,
|
290
|
+
stream_format: StreamFormat = StreamFormat.DELTACAT,
|
291
|
+
transaction: Optional[Transaction] = None,
|
292
|
+
**kwargs,
|
109
293
|
) -> Optional[TableDefinition]:
|
110
|
-
"""Get table definition metadata.
|
111
|
-
|
294
|
+
"""Get table definition metadata.
|
295
|
+
|
296
|
+
Args:
|
297
|
+
name: Name of the table to retrieve.
|
298
|
+
namespace: Optional namespace of the table. Uses default namespace if not specified.
|
299
|
+
table_version: Optional specific version of the table to retrieve. Defaults to the latest active version.
|
300
|
+
stream_format: Optional stream format to retrieve. Defaults to DELTACAT.
|
301
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
302
|
+
|
303
|
+
Returns:
|
304
|
+
Deltacat TableDefinition if the table exists, None otherwise. The table definition's table version will be
|
305
|
+
None if the requested version is not found. The table definition's stream will be None if the requested stream
|
306
|
+
format is not found.
|
307
|
+
"""
|
112
308
|
raise NotImplementedError("get_table not implemented")
|
113
309
|
|
114
310
|
|
115
311
|
def truncate_table(
|
116
|
-
table: str,
|
312
|
+
table: str,
|
313
|
+
*args,
|
314
|
+
namespace: Optional[str] = None,
|
315
|
+
table_version: Optional[str] = None,
|
316
|
+
transaction: Optional[Transaction] = None,
|
317
|
+
**kwargs,
|
117
318
|
) -> None:
|
118
|
-
"""Truncate table data.
|
319
|
+
"""Truncate table data.
|
320
|
+
|
321
|
+
Args:
|
322
|
+
table: Name of the table to truncate.
|
323
|
+
namespace: Optional namespace of the table. Uses default namespace if not specified.
|
324
|
+
table_version: Optional specific version of the table to truncate. Defaults to the latest active version.
|
325
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
326
|
+
|
327
|
+
Returns:
|
328
|
+
None
|
329
|
+
"""
|
119
330
|
raise NotImplementedError("truncate_table not implemented")
|
120
331
|
|
121
332
|
|
122
333
|
def rename_table(
|
123
|
-
table: str,
|
334
|
+
table: str,
|
335
|
+
new_name: str,
|
336
|
+
*args,
|
337
|
+
namespace: Optional[str] = None,
|
338
|
+
transaction: Optional[Transaction] = None,
|
339
|
+
**kwargs,
|
124
340
|
) -> None:
|
125
|
-
"""Rename
|
341
|
+
"""Rename an existing table.
|
342
|
+
|
343
|
+
Args:
|
344
|
+
table: Current name of the table.
|
345
|
+
new_name: New name for the table.
|
346
|
+
namespace: Optional namespace of the table. Uses default namespace if not specified.
|
347
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
348
|
+
|
349
|
+
Returns:
|
350
|
+
None
|
351
|
+
|
352
|
+
Raises:
|
353
|
+
TableNotFoundError: If the table does not exist.
|
354
|
+
"""
|
126
355
|
raise NotImplementedError("rename_table not implemented")
|
127
356
|
|
128
357
|
|
129
|
-
def table_exists(
|
130
|
-
|
358
|
+
def table_exists(
|
359
|
+
table: str,
|
360
|
+
*args,
|
361
|
+
namespace: Optional[str] = None,
|
362
|
+
table_version: Optional[str] = None,
|
363
|
+
stream_format: StreamFormat = StreamFormat.DELTACAT,
|
364
|
+
transaction: Optional[Transaction] = None,
|
365
|
+
**kwargs,
|
366
|
+
) -> bool:
|
367
|
+
"""Check if a table exists in the catalog.
|
368
|
+
|
369
|
+
Args:
|
370
|
+
table: Name of the table to check.
|
371
|
+
namespace: Optional namespace of the table. Uses default namespace if not specified.
|
372
|
+
table_version: Optional specific version of the table to check. Defaults to the latest active version.
|
373
|
+
stream_format: Optional stream format to check. Defaults to DELTACAT.
|
374
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
375
|
+
|
376
|
+
Returns:
|
377
|
+
True if the table exists, False otherwise.
|
378
|
+
"""
|
131
379
|
raise NotImplementedError("table_exists not implemented")
|
132
380
|
|
133
381
|
|
134
382
|
# namespace functions
|
135
|
-
def list_namespaces(
|
136
|
-
|
383
|
+
def list_namespaces(
|
384
|
+
*args,
|
385
|
+
transaction: Optional[Transaction] = None,
|
386
|
+
**kwargs,
|
387
|
+
) -> ListResult[Namespace]:
|
388
|
+
"""List a page of table namespaces.
|
389
|
+
|
390
|
+
Args:
|
391
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
392
|
+
|
393
|
+
Returns:
|
394
|
+
ListResult containing Namespace objects.
|
395
|
+
"""
|
137
396
|
raise NotImplementedError("list_namespaces not implemented")
|
138
397
|
|
139
398
|
|
140
|
-
def get_namespace(
|
141
|
-
|
142
|
-
|
399
|
+
def get_namespace(
|
400
|
+
namespace: str,
|
401
|
+
*args,
|
402
|
+
transaction: Optional[Transaction] = None,
|
403
|
+
**kwargs,
|
404
|
+
) -> Optional[Namespace]:
|
405
|
+
"""Get metadata for a specific table namespace.
|
406
|
+
|
407
|
+
Args:
|
408
|
+
namespace: Name of the namespace to retrieve.
|
409
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
410
|
+
|
411
|
+
Returns:
|
412
|
+
Namespace object if the namespace exists, None otherwise.
|
413
|
+
"""
|
143
414
|
raise NotImplementedError("get_namespace not implemented")
|
144
415
|
|
145
416
|
|
146
|
-
def namespace_exists(
|
147
|
-
|
417
|
+
def namespace_exists(
|
418
|
+
namespace: str,
|
419
|
+
*args,
|
420
|
+
transaction: Optional[Transaction] = None,
|
421
|
+
**kwargs,
|
422
|
+
) -> bool:
|
423
|
+
"""Check if a namespace exists.
|
424
|
+
|
425
|
+
Args:
|
426
|
+
namespace: Name of the namespace to check.
|
427
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
428
|
+
|
429
|
+
Returns:
|
430
|
+
True if the namespace exists, False otherwise.
|
431
|
+
"""
|
148
432
|
raise NotImplementedError("namespace_exists not implemented")
|
149
433
|
|
150
434
|
|
151
435
|
def create_namespace(
|
152
|
-
namespace: str,
|
436
|
+
namespace: str,
|
437
|
+
*args,
|
438
|
+
properties: Optional[NamespaceProperties] = None,
|
439
|
+
transaction: Optional[Transaction] = None,
|
440
|
+
**kwargs,
|
153
441
|
) -> Namespace:
|
154
|
-
"""
|
155
|
-
|
442
|
+
"""Create a new namespace.
|
443
|
+
|
444
|
+
Args:
|
445
|
+
namespace: Name of the namespace to create.
|
446
|
+
properties: Optional properties for the namespace.
|
447
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
448
|
+
|
449
|
+
Returns:
|
450
|
+
Created Namespace object.
|
451
|
+
|
452
|
+
Raises:
|
453
|
+
NamespaceAlreadyExistsError: If the namespace already exists.
|
454
|
+
"""
|
156
455
|
raise NotImplementedError("create_namespace not implemented")
|
157
456
|
|
158
457
|
|
159
458
|
def alter_namespace(
|
160
459
|
namespace: str,
|
161
|
-
permissions: Optional[Dict[str, Any]] = None,
|
162
|
-
new_namespace: Optional[str] = None,
|
163
460
|
*args,
|
164
|
-
|
461
|
+
properties: Optional[NamespaceProperties] = None,
|
462
|
+
new_namespace: Optional[str] = None,
|
463
|
+
transaction: Optional[Transaction] = None,
|
464
|
+
**kwargs,
|
165
465
|
) -> None:
|
166
|
-
"""Alter
|
466
|
+
"""Alter a namespace definition.
|
467
|
+
|
468
|
+
Args:
|
469
|
+
namespace: Name of the namespace to alter.
|
470
|
+
properties: Optional new properties for the namespace.
|
471
|
+
new_namespace: Optional new name for the namespace.
|
472
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
473
|
+
|
474
|
+
Returns:
|
475
|
+
None
|
476
|
+
"""
|
167
477
|
raise NotImplementedError("alter_namespace not implemented")
|
168
478
|
|
169
479
|
|
170
|
-
def drop_namespace(
|
171
|
-
|
172
|
-
|
173
|
-
|
480
|
+
def drop_namespace(
|
481
|
+
namespace: str,
|
482
|
+
*args,
|
483
|
+
purge: bool = False,
|
484
|
+
transaction: Optional[Transaction] = None,
|
485
|
+
**kwargs,
|
486
|
+
) -> None:
|
487
|
+
"""Drop a namespace and all of its tables from the catalog.
|
174
488
|
|
489
|
+
Args:
|
490
|
+
namespace: Name of the namespace to drop.
|
491
|
+
purge: If True, permanently delete all table data in the namespace.
|
492
|
+
If False, only removes the namespace from the catalog.
|
493
|
+
transaction: Optional transaction to use. If None, creates a new transaction.
|
175
494
|
|
176
|
-
|
177
|
-
|
178
|
-
|
495
|
+
Returns:
|
496
|
+
None
|
497
|
+
"""
|
498
|
+
raise NotImplementedError("drop_namespace not implemented")
|
179
499
|
|
180
500
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
501
|
+
def default_namespace(*args, **kwargs) -> str:
|
502
|
+
"""Return the default namespace for the catalog.
|
503
|
+
|
504
|
+
Returns:
|
505
|
+
Name of the default namespace.
|
506
|
+
"""
|
507
|
+
raise NotImplementedError("default_namespace not implemented")
|