You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by li...@apache.org on 2025/07/13 07:59:33 UTC
(iceberg-rust) branch main updated: refactor: Move memory catalog into core (#1480)
This is an automated email from the ASF dual-hosted git repository.
liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 8919162d refactor: Move memory catalog into core (#1480)
8919162d is described below
commit 8919162dd4c8e821f313601a42c44da1fe666167
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Sun Jul 13 15:59:26 2025 +0800
refactor: Move memory catalog into core (#1480)
## Which issue does this PR close?
- Closes https://github.com/apache/iceberg-rust/issues/1472
## What changes are included in this PR?
Merge memory catalog into core.
## Are these changes tested?
---------
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
.github/workflows/publish.yml | 1 -
Cargo.lock | 17 +-
Cargo.toml | 1 -
README.md | 6 -
bindings/python/Cargo.lock | 11 +-
crates/catalog/memory/Cargo.toml | 42 ---
crates/catalog/memory/DEPENDENCIES.rust.tsv | 325 ---------------------
crates/catalog/memory/README.md | 27 --
crates/iceberg/Cargo.toml | 1 +
.../src => iceberg/src/catalog/memory}/catalog.rs | 20 +-
.../lib.rs => iceberg/src/catalog/memory/mod.rs} | 6 +-
.../src/catalog/memory}/namespace_state.rs | 3 +-
crates/iceberg/src/catalog/mod.rs | 3 +
crates/iceberg/src/lib.rs | 4 +-
crates/iceberg/src/writer/mod.rs | 4 +-
crates/integrations/datafusion/Cargo.toml | 1 -
.../tests/integration_datafusion_test.rs | 3 +-
17 files changed, 32 insertions(+), 443 deletions(-)
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 5a8a179f..912a5b39 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -41,7 +41,6 @@ jobs:
- "crates/iceberg"
- "crates/catalog/glue"
- "crates/catalog/hms"
- - "crates/catalog/memory"
- "crates/catalog/rest"
- "crates/catalog/sql"
- "crates/integrations/datafusion"
diff --git a/Cargo.lock b/Cargo.lock
index 786b1b72..552fcb08 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3520,6 +3520,7 @@ dependencies = [
"parquet",
"pretty_assertions",
"rand 0.8.5",
+ "regex",
"reqwest",
"roaring",
"rust_decimal",
@@ -3593,21 +3594,6 @@ dependencies = [
"volo-thrift",
]
-[[package]]
-name = "iceberg-catalog-memory"
-version = "0.5.1"
-dependencies = [
- "async-trait",
- "futures",
- "iceberg",
- "itertools 0.13.0",
- "regex",
- "serde_json",
- "tempfile",
- "tokio",
- "uuid",
-]
-
[[package]]
name = "iceberg-catalog-rest"
version = "0.5.1"
@@ -3675,7 +3661,6 @@ dependencies = [
"expect-test",
"futures",
"iceberg",
- "iceberg-catalog-memory",
"parquet",
"tempfile",
"tokio",
diff --git a/Cargo.toml b/Cargo.toml
index fd83fd55..9c6d22de 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -75,7 +75,6 @@ futures = "0.3"
hive_metastore = "0.1"
http = "1.2"
iceberg = { version = "0.5.1", path = "./crates/iceberg" }
-iceberg-catalog-memory = { version = "0.5.1", path = "./crates/catalog/memory" }
iceberg-catalog-rest = { version = "0.5.1", path = "./crates/catalog/rest" }
iceberg-datafusion = { version = "0.5.1", path = "./crates/integrations/datafusion" }
indicatif = "0.17"
diff --git a/README.md b/README.md
index 7f9b8f31..88b8714c 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,6 @@ The Apache Iceberg Rust project is composed of the following components:
| [iceberg-datafusion] | [![iceberg-datafusion image]][iceberg-datafusion link] | [![docs release]][iceberg-datafusion release docs] [![docs dev]][iceberg-datafusion dev docs] |
| [iceberg-catalog-glue] | [![iceberg-catalog-glue image]][iceberg-catalog-glue link] | [![docs release]][iceberg-catalog-glue release docs] [![docs dev]][iceberg-catalog-glue dev docs] |
| [iceberg-catalog-hms] | [![iceberg-catalog-hms image]][iceberg-catalog-hms link] | [![docs release]][iceberg-catalog-hms release docs] [![docs dev]][iceberg-catalog-hms dev docs] |
-| [iceberg-catalog-memory] | [![iceberg-catalog-memory image]][iceberg-catalog-memory link] | [![docs release]][iceberg-catalog-memory release docs] [![docs dev]][iceberg-catalog-memory dev docs] |
| [iceberg-catalog-rest] | [![iceberg-catalog-rest image]][iceberg-catalog-rest link] | [![docs release]][iceberg-catalog-rest release docs] [![docs dev]][iceberg-catalog-rest dev docs] |
[docs release]: https://img.shields.io/badge/docs-release-blue
@@ -62,11 +61,6 @@ The Apache Iceberg Rust project is composed of the following components:
[iceberg-catalog-hms release docs]: https://docs.rs/iceberg-catalog-hms
[iceberg-catalog-hms dev docs]: https://rust.iceberg.apache.org/api/iceberg_catalog_hms/
-[iceberg-catalog-memory]: crates/catalog/memory/README.md
-[iceberg-catalog-memory image]: https://img.shields.io/crates/v/iceberg-catalog-memory.svg
-[iceberg-catalog-memory link]: https://crates.io/crates/iceberg-catalog-memory
-[iceberg-catalog-memory release docs]: https://docs.rs/iceberg-catalog-memory
-[iceberg-catalog-memory dev docs]: https://rust.iceberg.apache.org/api/iceberg_catalog_memory/
[iceberg-catalog-rest]: crates/catalog/rest/README.md
[iceberg-catalog-rest image]: https://img.shields.io/crates/v/iceberg-catalog-rest.svg
diff --git a/bindings/python/Cargo.lock b/bindings/python/Cargo.lock
index b35182c3..4b229495 100644
--- a/bindings/python/Cargo.lock
+++ b/bindings/python/Cargo.lock
@@ -404,6 +404,12 @@ dependencies = [
"regex-syntax 0.8.5",
]
+[[package]]
+name = "as-any"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0f477b951e452a0b6b4a10b53ccd569042d1d01729b519e02074a9c0958a063"
+
[[package]]
name = "as_derive_utils"
version = "0.11.0"
@@ -2179,6 +2185,7 @@ dependencies = [
"arrow-schema",
"arrow-select",
"arrow-string",
+ "as-any",
"async-trait",
"base64",
"bimap",
@@ -2844,9 +2851,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "opendal"
-version = "0.53.2"
+version = "0.53.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11ff9e9656d1cb3c58582ea18e6d9e71076a7ab2614207821d1242d7da2daed5"
+checksum = "f947c4efbca344c1a125753366033c8107f552b2e3f8251815ed1908f116ca3e"
dependencies = [
"anyhow",
"async-trait",
diff --git a/crates/catalog/memory/Cargo.toml b/crates/catalog/memory/Cargo.toml
deleted file mode 100644
index dfd3625a..00000000
--- a/crates/catalog/memory/Cargo.toml
+++ /dev/null
@@ -1,42 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[package]
-edition = { workspace = true }
-homepage = { workspace = true }
-name = "iceberg-catalog-memory"
-rust-version = { workspace = true }
-version = { workspace = true }
-
-categories = ["database"]
-description = "Apache Iceberg Rust Memory Catalog API"
-keywords = ["iceberg", "memory", "catalog"]
-license = { workspace = true }
-repository = { workspace = true }
-
-[dependencies]
-async-trait = { workspace = true }
-futures = { workspace = true }
-iceberg = { workspace = true }
-itertools = { workspace = true }
-serde_json = { workspace = true }
-uuid = { workspace = true, features = ["v4"] }
-
-[dev-dependencies]
-regex = { workspace = true }
-tempfile = { workspace = true }
-tokio = { workspace = true }
diff --git a/crates/catalog/memory/DEPENDENCIES.rust.tsv b/crates/catalog/memory/DEPENDENCIES.rust.tsv
deleted file mode 100644
index 16691243..00000000
--- a/crates/catalog/memory/DEPENDENCIES.rust.tsv
+++ /dev/null
@@ -1,325 +0,0 @@
-crate 0BSD Apache-2.0 Apache-2.0 WITH LLVM-exception BSD-2-Clause BSD-3-Clause BSL-1.0 CC0-1.0 ISC MIT MPL-2.0 Unicode-3.0 Unlicense Zlib
-addr2line@0.24.2 X X
-adler2@2.0.0 X X X
-adler32@1.2.0 X
-ahash@0.8.11 X X
-aho-corasick@1.1.3 X X
-alloc-no-stdlib@2.0.4 X
-alloc-stdlib@0.2.2 X
-allocator-api2@0.2.21 X X
-android-tzdata@0.1.1 X X
-android_system_properties@0.1.5 X X
-anyhow@1.0.95 X X
-apache-avro@0.17.0 X
-array-init@2.1.0 X X
-arrayvec@0.7.6 X X
-arrow-arith@55.1.0 X
-arrow-array@55.1.0 X
-arrow-buffer@55.1.0 X
-arrow-cast@55.1.0 X
-arrow-data@55.1.0 X
-arrow-ipc@55.1.0 X
-arrow-ord@55.1.0 X
-arrow-schema@55.1.0 X
-arrow-select@55.1.0 X
-arrow-string@55.1.0 X
-async-lock@3.4.0 X X
-async-trait@0.1.88 X X
-atoi@2.0.0 X
-autocfg@1.4.0 X X
-backon@1.3.0 X
-backtrace@0.3.74 X X
-base64@0.22.1 X X
-bigdecimal@0.4.8 X X
-bimap@0.6.3 X X
-bitflags@2.8.0 X X
-block-buffer@0.10.4 X X
-brotli@8.0.1 X X
-brotli-decompressor@5.0.0 X X
-bumpalo@3.17.0 X X
-bytemuck@1.21.0 X X X
-byteorder@1.5.0 X X
-bytes@1.10.0 X
-cc@1.2.14 X X
-cfg-if@1.0.0 X X
-chrono@0.4.41 X X
-concurrent-queue@2.5.0 X X
-const-oid@0.9.6 X X
-const-random@0.1.18 X X
-const-random-macro@0.1.16 X X
-core-foundation-sys@0.8.7 X X
-core2@0.4.0 X X
-cpufeatures@0.2.17 X X
-crc32c@0.6.8 X X
-crc32fast@1.4.2 X X
-crossbeam-channel@0.5.15 X X
-crossbeam-epoch@0.9.18 X X
-crossbeam-utils@0.8.21 X X
-crunchy@0.2.3 X
-crypto-common@0.1.6 X X
-darling@0.20.10 X
-darling_core@0.20.10 X
-darling_macro@0.20.10 X
-dary_heap@0.3.7 X X
-derive_builder@0.20.2 X X
-derive_builder_core@0.20.2 X X
-derive_builder_macro@0.20.2 X X
-digest@0.10.7 X X
-displaydoc@0.2.5 X X
-either@1.15.0 X X
-event-listener@5.4.0 X X
-event-listener-strategy@0.5.3 X X
-fastrand@2.3.0 X X
-flatbuffers@25.2.10 X
-flate2@1.1.1 X X
-fnv@1.0.7 X X
-form_urlencoded@1.2.1 X X
-futures@0.3.31 X X
-futures-channel@0.3.31 X X
-futures-core@0.3.31 X X
-futures-executor@0.3.31 X X
-futures-io@0.3.31 X X
-futures-macro@0.3.31 X X
-futures-sink@0.3.31 X X
-futures-task@0.3.31 X X
-futures-util@0.3.31 X X
-generator@0.8.4 X X
-generic-array@0.14.7 X
-getrandom@0.2.15 X X
-getrandom@0.3.1 X X
-gimli@0.31.1 X X
-gloo-timers@0.3.0 X X
-half@2.6.0 X X
-hashbrown@0.14.5 X X
-hashbrown@0.15.2 X X
-heck@0.5.0 X X
-hermit-abi@0.3.9 X X
-hex@0.4.3 X X
-hmac@0.12.1 X X
-home@0.5.11 X X
-http@1.3.1 X X
-http-body@1.0.1 X
-http-body-util@0.1.2 X
-httparse@1.10.0 X X
-hyper@1.6.0 X
-hyper-rustls@0.27.5 X X X
-hyper-util@0.1.10 X
-iana-time-zone@0.1.61 X X
-iana-time-zone-haiku@0.1.2 X X
-iceberg@0.5.1 X
-iceberg-catalog-memory@0.5.1 X
-iceberg_test_utils@0.5.1 X
-icu_collections@1.5.0 X
-icu_locid@1.5.0 X
-icu_locid_transform@1.5.0 X
-icu_locid_transform_data@1.5.0 X
-icu_normalizer@1.5.0 X
-icu_normalizer_data@1.5.0 X
-icu_properties@1.5.1 X
-icu_properties_data@1.5.0 X
-icu_provider@1.5.0 X
-icu_provider_macros@1.5.0 X
-ident_case@1.0.1 X X
-idna@1.0.3 X X
-idna_adapter@1.2.0 X X
-integer-encoding@3.0.4 X
-ipnet@2.11.0 X X
-itertools@0.13.0 X X
-itoa@1.0.14 X X
-jobserver@0.1.32 X X
-js-sys@0.3.77 X X
-lazy_static@1.5.0 X X
-lexical-core@1.0.5 X X
-lexical-parse-float@1.0.5 X X
-lexical-parse-integer@1.0.5 X X
-lexical-util@1.0.6 X X
-lexical-write-float@1.0.5 X X
-lexical-write-integer@1.0.5 X X
-libc@0.2.171 X X
-libflate@2.1.0 X
-libflate_lz77@2.1.0 X
-libm@0.2.11 X X
-libz-rs-sys@0.5.0 X
-litemap@0.7.4 X
-lock_api@0.4.12 X X
-log@0.4.25 X X
-loom@0.7.2 X
-lz4_flex@0.11.3 X
-matchers@0.1.0 X
-md-5@0.10.6 X X
-memchr@2.7.4 X X
-mime@0.3.17 X X
-miniz_oxide@0.8.8 X X X
-mio@1.0.3 X
-moka@0.12.10 X X
-murmur3@0.5.2 X X
-nu-ansi-term@0.46.0 X
-num@0.4.3 X X
-num-bigint@0.4.6 X X
-num-complex@0.4.6 X X
-num-integer@0.1.46 X X
-num-iter@0.1.45 X X
-num-rational@0.4.2 X X
-num-traits@0.2.19 X X
-num_cpus@1.16.0 X X
-object@0.36.7 X X
-once_cell@1.21.1 X X
-opendal@0.53.0 X
-ordered-float@2.10.1 X
-ordered-float@4.6.0 X
-overload@0.1.1 X
-parking@2.2.1 X X
-parking_lot@0.12.3 X X
-parking_lot_core@0.9.10 X X
-parquet@55.1.0 X
-paste@1.0.15 X X
-percent-encoding@2.3.1 X X
-pin-project-lite@0.2.16 X X
-pin-utils@0.1.0 X X
-pkg-config@0.3.31 X X
-portable-atomic@1.10.0 X X
-ppv-lite86@0.2.20 X X
-proc-macro2@1.0.93 X X
-quad-rand@0.2.3 X
-quick-xml@0.36.2 X
-quote@1.0.40 X X
-rand@0.8.5 X X
-rand_chacha@0.3.1 X X
-rand_core@0.6.4 X X
-redox_syscall@0.5.8 X
-regex@1.11.1 X X
-regex-automata@0.1.10 X X
-regex-automata@0.4.9 X X
-regex-lite@0.1.6 X X
-regex-syntax@0.6.29 X X
-regex-syntax@0.8.5 X X
-reqsign@0.16.1 X
-reqwest@0.12.12 X X
-ring@0.17.13 X X
-rle-decode-fast@1.0.3 X X
-roaring@0.10.12 X X
-rust_decimal@1.37.1 X
-rustc-demangle@0.1.24 X X
-rustc_version@0.4.1 X X
-rustls@0.23.23 X X X
-rustls-pemfile@2.2.0 X X X
-rustls-pki-types@1.11.0 X X
-rustls-webpki@0.102.8 X
-rustversion@1.0.19 X X
-ryu@1.0.19 X X
-scoped-tls@1.0.1 X X
-scopeguard@1.2.0 X X
-semver@1.0.25 X X
-seq-macro@0.3.5 X X
-serde@1.0.217 X X
-serde_bytes@0.11.15 X X
-serde_derive@1.0.217 X X
-serde_json@1.0.138 X X
-serde_repr@0.1.19 X X
-serde_urlencoded@0.7.1 X X
-serde_with@3.12.0 X X
-serde_with_macros@3.12.0 X X
-sha1@0.10.6 X X
-sha2@0.10.8 X X
-sharded-slab@0.1.7 X
-shlex@1.3.0 X X
-simdutf8@0.1.5 X X
-slab@0.4.9 X
-smallvec@1.14.0 X X
-snap@1.1.1 X
-socket2@0.5.8 X X
-stable_deref_trait@1.2.0 X X
-static_assertions@1.1.0 X X
-strsim@0.11.1 X
-strum@0.26.3 X
-strum_macros@0.26.4 X
-subtle@2.6.1 X
-syn@2.0.101 X X
-sync_wrapper@1.0.2 X
-synstructure@0.13.1 X
-tagptr@0.2.0 X X
-thiserror@1.0.69 X X
-thiserror-impl@1.0.69 X X
-thread_local@1.1.8 X X
-threadpool@1.8.1 X X
-thrift@0.17.0 X
-tiny-keccak@2.0.2 X
-tinystr@0.7.6 X
-tokio@1.45.0 X
-tokio-macros@2.5.0 X
-tokio-rustls@0.26.1 X X
-tokio-util@0.7.15 X
-tower@0.5.2 X
-tower-layer@0.3.3 X
-tower-service@0.3.3 X
-tracing@0.1.41 X
-tracing-attributes@0.1.28 X
-tracing-core@0.1.33 X
-tracing-log@0.2.0 X
-tracing-subscriber@0.3.19 X
-try-lock@0.2.5 X
-twox-hash@1.6.3 X
-twox-hash@2.1.0 X
-typed-builder@0.19.1 X X
-typed-builder@0.20.1 X X
-typed-builder-macro@0.19.1 X X
-typed-builder-macro@0.20.1 X X
-typenum@1.17.0 X X
-unicode-ident@1.0.16 X X X
-untrusted@0.9.0 X
-url@2.5.4 X X
-utf16_iter@1.0.5 X X
-utf8_iter@1.0.4 X X
-uuid@1.17.0 X X
-version_check@0.9.5 X X
-want@0.3.1 X
-wasi@0.11.0+wasi-snapshot-preview1 X X X
-wasi@0.13.3+wasi-0.2.2 X X X
-wasm-bindgen@0.2.100 X X
-wasm-bindgen-backend@0.2.100 X X
-wasm-bindgen-futures@0.4.50 X X
-wasm-bindgen-macro@0.2.100 X X
-wasm-bindgen-macro-support@0.2.100 X X
-wasm-bindgen-shared@0.2.100 X X
-wasm-streams@0.4.2 X X
-web-sys@0.3.77 X X
-webpki-roots@0.26.8 X
-winapi@0.3.9 X X
-winapi-i686-pc-windows-gnu@0.4.0 X X
-winapi-x86_64-pc-windows-gnu@0.4.0 X X
-windows@0.58.0 X X
-windows-core@0.52.0 X X
-windows-core@0.58.0 X X
-windows-implement@0.58.0 X X
-windows-interface@0.58.0 X X
-windows-link@0.1.1 X X
-windows-registry@0.2.0 X X
-windows-result@0.2.0 X X
-windows-strings@0.1.0 X X
-windows-sys@0.52.0 X X
-windows-sys@0.59.0 X X
-windows-targets@0.52.6 X X
-windows_aarch64_gnullvm@0.52.6 X X
-windows_aarch64_msvc@0.52.6 X X
-windows_i686_gnu@0.52.6 X X
-windows_i686_gnullvm@0.52.6 X X
-windows_i686_msvc@0.52.6 X X
-windows_x86_64_gnu@0.52.6 X X
-windows_x86_64_gnullvm@0.52.6 X X
-windows_x86_64_msvc@0.52.6 X X
-wit-bindgen-rt@0.33.0 X X X
-write16@1.0.0 X X
-writeable@0.5.5 X
-yoke@0.7.5 X
-yoke-derive@0.7.5 X
-zerocopy@0.7.35 X X X
-zerocopy-derive@0.7.35 X X X
-zerofrom@0.1.5 X
-zerofrom-derive@0.1.5 X
-zeroize@1.8.1 X X
-zerovec@0.10.4 X
-zerovec-derive@0.10.3 X
-zlib-rs@0.5.0 X
-zstd@0.13.2 X
-zstd-safe@7.2.1 X X
-zstd-sys@2.0.13+zstd.1.5.6 X X
diff --git a/crates/catalog/memory/README.md b/crates/catalog/memory/README.md
deleted file mode 100644
index 5b04f78a..00000000
--- a/crates/catalog/memory/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
--->
-
-# Apache Iceberg Memory Catalog Official Native Rust Implementation
-
-[](https://crates.io/crates/iceberg-catalog-memory)
-[](https://docs.rs/iceberg/latest/iceberg-catalog-memory/)
-
-This crate contains the official Native Rust implementation of Apache Iceberg Memory Catalog.
-
-See the [API documentation](https://docs.rs/iceberg-catalog-memory/latest) for examples and the full API.
diff --git a/crates/iceberg/Cargo.toml b/crates/iceberg/Cargo.toml
index 52f5b4d8..ac56c0b3 100644
--- a/crates/iceberg/Cargo.toml
+++ b/crates/iceberg/Cargo.toml
@@ -97,6 +97,7 @@ expect-test = { workspace = true }
iceberg_test_utils = { path = "../test_utils", features = ["tests"] }
pretty_assertions = { workspace = true }
rand = { workspace = true }
+regex = { workspace = true }
tempfile = { workspace = true }
tera = { workspace = true }
diff --git a/crates/catalog/memory/src/catalog.rs b/crates/iceberg/src/catalog/memory/catalog.rs
similarity index 99%
rename from crates/catalog/memory/src/catalog.rs
rename to crates/iceberg/src/catalog/memory/catalog.rs
index 7454de12..aa628850 100644
--- a/crates/catalog/memory/src/catalog.rs
+++ b/crates/iceberg/src/catalog/memory/catalog.rs
@@ -21,17 +21,17 @@ use std::collections::HashMap;
use async_trait::async_trait;
use futures::lock::Mutex;
-use iceberg::io::FileIO;
-use iceberg::spec::{TableMetadata, TableMetadataBuilder};
-use iceberg::table::Table;
-use iceberg::{
- Catalog, Error, ErrorKind, Namespace, NamespaceIdent, Result, TableCommit, TableCreation,
- TableIdent,
-};
use itertools::Itertools;
use uuid::Uuid;
-use crate::namespace_state::NamespaceState;
+use super::namespace_state::NamespaceState;
+use crate::io::FileIO;
+use crate::spec::{TableMetadata, TableMetadataBuilder};
+use crate::table::Table;
+use crate::{
+ Catalog, Error, ErrorKind, Namespace, NamespaceIdent, Result, TableCommit, TableCreation,
+ TableIdent,
+};
/// namespace `location` property
const LOCATION: &str = "location";
@@ -291,12 +291,12 @@ mod tests {
use std::hash::Hash;
use std::iter::FromIterator;
- use iceberg::io::FileIOBuilder;
- use iceberg::spec::{NestedField, PartitionSpec, PrimitiveType, Schema, SortOrder, Type};
use regex::Regex;
use tempfile::TempDir;
use super::*;
+ use crate::io::FileIOBuilder;
+ use crate::spec::{NestedField, PartitionSpec, PrimitiveType, Schema, SortOrder, Type};
fn temp_path() -> String {
let temp_dir = TempDir::new().unwrap();
diff --git a/crates/catalog/memory/src/lib.rs b/crates/iceberg/src/catalog/memory/mod.rs
similarity index 90%
rename from crates/catalog/memory/src/lib.rs
rename to crates/iceberg/src/catalog/memory/mod.rs
index 8988ac7b..bcad16dd 100644
--- a/crates/catalog/memory/src/lib.rs
+++ b/crates/iceberg/src/catalog/memory/mod.rs
@@ -15,11 +15,9 @@
// specific language governing permissions and limitations
// under the License.
-//! Iceberg memory Catalog API implementation.
-
-#![deny(missing_docs)]
+//! Memory catalog implementation.
mod catalog;
mod namespace_state;
-pub use catalog::*;
+pub use catalog::MemoryCatalog;
diff --git a/crates/catalog/memory/src/namespace_state.rs b/crates/iceberg/src/catalog/memory/namespace_state.rs
similarity index 99%
rename from crates/catalog/memory/src/namespace_state.rs
rename to crates/iceberg/src/catalog/memory/namespace_state.rs
index e324e7a3..2ab00e71 100644
--- a/crates/catalog/memory/src/namespace_state.rs
+++ b/crates/iceberg/src/catalog/memory/namespace_state.rs
@@ -17,9 +17,10 @@
use std::collections::{HashMap, hash_map};
-use iceberg::{Error, ErrorKind, NamespaceIdent, Result, TableIdent};
use itertools::Itertools;
+use crate::{Error, ErrorKind, NamespaceIdent, Result, TableIdent};
+
// Represents the state of a namespace
#[derive(Debug, Clone, Default)]
pub(crate) struct NamespaceState {
diff --git a/crates/iceberg/src/catalog/mod.rs b/crates/iceberg/src/catalog/mod.rs
index ebb9a66c..409a80ee 100644
--- a/crates/iceberg/src/catalog/mod.rs
+++ b/crates/iceberg/src/catalog/mod.rs
@@ -17,6 +17,8 @@
//! Catalog API for Apache Iceberg
+pub mod memory;
+
use std::collections::HashMap;
use std::fmt::{Debug, Display};
use std::future::Future;
@@ -26,6 +28,7 @@ use std::sync::Arc;
use _serde::deserialize_snapshot;
use async_trait::async_trait;
+pub use memory::MemoryCatalog;
use serde_derive::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
use uuid::Uuid;
diff --git a/crates/iceberg/src/lib.rs b/crates/iceberg/src/lib.rs
index 63af25e9..49193be5 100644
--- a/crates/iceberg/src/lib.rs
+++ b/crates/iceberg/src/lib.rs
@@ -22,12 +22,10 @@
//! ## Scan A Table
//!
//! ```rust, ignore
-//! // This example uses `iceberg_catalog_memory`, which isn't enabled by default.
-//! // To run this, add `iceberg-catalog-memory` as a dependency in your Cargo.toml.
//! use futures::TryStreamExt;
//! use iceberg::io::{FileIO, FileIOBuilder};
+//! use iceberg::MemoryCatalog;
//! use iceberg::{Catalog, Result, TableIdent};
-//! use iceberg_catalog_memory::MemoryCatalog;
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
diff --git a/crates/iceberg/src/writer/mod.rs b/crates/iceberg/src/writer/mod.rs
index 26e19919..62b33e0b 100644
--- a/crates/iceberg/src/writer/mod.rs
+++ b/crates/iceberg/src/writer/mod.rs
@@ -55,7 +55,7 @@
//! };
//! use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
//! use iceberg::{Catalog, Result, TableIdent};
-//! use iceberg_catalog_memory::MemoryCatalog;
+//! use crate::MemoryCatalog;
//! use parquet::file::properties::WriterProperties;
//! #[tokio::main]
//! async fn main() -> Result<()> {
@@ -112,7 +112,7 @@
//! };
//! use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
//! use iceberg::{Catalog, Result, TableIdent};
-//! use iceberg_catalog_memory::MemoryCatalog;
+//! use crate::MemoryCatalog;
//! use parquet::file::properties::WriterProperties;
//!
//! #[derive(Clone)]
diff --git a/crates/integrations/datafusion/Cargo.toml b/crates/integrations/datafusion/Cargo.toml
index 0ff370cf..6954950b 100644
--- a/crates/integrations/datafusion/Cargo.toml
+++ b/crates/integrations/datafusion/Cargo.toml
@@ -38,6 +38,5 @@ tokio = { workspace = true }
[dev-dependencies]
expect-test = { workspace = true }
-iceberg-catalog-memory = { workspace = true }
parquet = { workspace = true }
tempfile = { workspace = true }
diff --git a/crates/integrations/datafusion/tests/integration_datafusion_test.rs b/crates/integrations/datafusion/tests/integration_datafusion_test.rs
index e9b0eb3c..1491e4db 100644
--- a/crates/integrations/datafusion/tests/integration_datafusion_test.rs
+++ b/crates/integrations/datafusion/tests/integration_datafusion_test.rs
@@ -29,8 +29,7 @@ use expect_test::expect;
use iceberg::io::FileIOBuilder;
use iceberg::spec::{NestedField, PrimitiveType, Schema, StructType, Type};
use iceberg::test_utils::check_record_batches;
-use iceberg::{Catalog, NamespaceIdent, Result, TableCreation};
-use iceberg_catalog_memory::MemoryCatalog;
+use iceberg::{Catalog, MemoryCatalog, NamespaceIdent, Result, TableCreation};
use iceberg_datafusion::IcebergCatalogProvider;
use tempfile::TempDir;