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 <[email protected]>
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 <[email protected]>
---
 .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
[email protected]               X                                               
        X                               
[email protected]   X       X                                                       
X                               
[email protected]                                                                  
                                X
[email protected]           X                                                       
X                               
[email protected]                                                             
        X                       X       
[email protected]                                  X                       
                                        
[email protected]                                     X                       
                                        
[email protected]          X                                               
        X                               
[email protected]           X                                               
        X                               
[email protected]                X                               
                        X                               
[email protected]          X                                                       
X                               
[email protected]             X                                               
                                        
[email protected]               X                                               
        X                               
[email protected]         X                                                       
X                               
[email protected]             X                                               
                                        
[email protected]             X                                               
                                        
[email protected]            X                                               
                                        
[email protected]              X                                               
                                        
[email protected]              X                                               
                                        
[email protected]               X                                               
                                        
[email protected]               X                                               
                                        
[email protected]            X                                               
                                        
[email protected]            X                                               
                                        
[email protected]            X                                               
                                        
[email protected]               X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]                                                                     
X                               
[email protected]          X                                                       
X                               
[email protected]           X                                                       
                                
[email protected]               X                                               
        X                               
[email protected]          X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]            X                                                       
X                               
[email protected]         X                                                       
X                               
[email protected]            X                                               
        X                               
[email protected]                                   X                               
X                               
[email protected]                                      X               
                X                               
[email protected]         X                                                       
X                               
[email protected]                X                                               
        X                               X
[email protected]                                                                
        X                       X       
[email protected]                                                                   
X                               
[email protected]              X                                                       
X                               
[email protected]           X                                                       
X                               
[email protected]          X                                                       
X                               
[email protected]         X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]              X                                       
                X                               
[email protected]              X                                       
                X                               
[email protected]            X                                                       
X                               
[email protected]             X                                               
        X                               
[email protected]           X                                                       
X                               
[email protected]                X                                               
        X                               
[email protected]               X                                       
                X                               
[email protected]         X                                               
        X                               
[email protected]         X                                               
        X                               
[email protected]                                                                  
X                               
[email protected]            X                                               
        X                               
[email protected]                                                                
        X                               
[email protected]                                                           
        X                               
[email protected]                                                          
        X                               
[email protected]                X                                               
        X                               
[email protected]          X                                               
        X                               
[email protected]             X                                       
                X                               
[email protected]            X                                       
                X                               
[email protected]          X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]          X                                                       
X                               
[email protected]           X                                               
        X                               
[email protected]          X                                       
                X                               
[email protected]         X                                                       
X                               
[email protected]            X                                               
                                        
[email protected]           X                                                       
X                               
[email protected]              X                                                       
X                               
[email protected]          X                                               
        X                               
[email protected]         X                                                       
X                               
[email protected]         X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]                X                                       
                X                               
[email protected]              X                                               
        X                               
[email protected]           X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]                                                           
        X                               
[email protected]               X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]           X                                                       
X                               
[email protected]              X                                               
        X                               
[email protected]             X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]               X                                               
        X                               
[email protected]             X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]              X                                                       
X                               
[email protected]            X                                                       
X                               
[email protected]            X                                                       
X                               
[email protected]             X                                                       
X                               
[email protected]                                                                
        X                               
[email protected]                                                           
        X                               
[email protected]                X                                               
        X                               
[email protected]                                                                    
X                               
[email protected]            X                                               
X       X                               
[email protected]                                                              
        X                               
[email protected]          X                                               
        X                               
[email protected]             X                                       
                X                               
[email protected]          X                                                       
                                
[email protected]           X                                       
                                                
[email protected]               X                                       
                                                
[email protected]                                                          
                        X               
[email protected]                                                                
                        X               
[email protected]                                                      
                                X               
[email protected]                                                 
                                X               
[email protected]                                                           
                        X               
[email protected]                                                      
                                X               
[email protected]                                                           
                        X               
[email protected]                                                      
                                X               
[email protected]                                                             
                        X               
[email protected]                                                      
                                X               
[email protected]               X                                               
        X                               
[email protected]             X                                                       
X                               
[email protected]             X                                               
        X                               
[email protected]                                                         
        X                               
[email protected]           X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]            X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]          X                                                       
X                               
[email protected]              X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]              X                                       
                X                               
[email protected]            X                                       
                X                               
[email protected]             X                                               
        X                               
[email protected]              X                                       
                X                               
[email protected]            X                                       
                X                               
[email protected]           X                                                       
X                               
[email protected]                                                                 
X                               
[email protected]                                                            
        X                               
[email protected]            X                                                       
X                               
[email protected]                                                              
                                        X
[email protected]                                                                  
                X               
[email protected]                X                                               
        X                               
[email protected]             X                                                       
X                               
[email protected]                                                                     
X                               
[email protected]                                                                
        X                               
[email protected]                                                                 
X                               
[email protected]            X                                                       
X                               
[email protected]                                                                   
X                       X       
[email protected]            X                                                       
X                               
[email protected]              X                                               
        X                               X
[email protected]                                                                      
X                               
[email protected]           X                                                       
X                               
[email protected]          X                                                       
X                               
[email protected]                                                            
        X                               
[email protected]              X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]              X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]              X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]          X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]         X                                                       
                                
[email protected]                                                           
        X                               
[email protected]                                                            
        X                               
[email protected]                                                                 
X                               
[email protected]          X                                                       
X                               
[email protected]             X                                               
        X                               
[email protected]                X                                       
                X                               
[email protected]         X                                                       
                                
[email protected]           X                                                       
X                               
[email protected]         X                                               
        X                               
[email protected]                X                                       
                X                               
[email protected]                X                                               
        X                               
[email protected]              X                                               
        X                               
[email protected]         X                                               
        X                               
[email protected]              X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]                                                                
        X                               
[email protected]                                                               
        X                               
[email protected]           X                                                       
X                               
[email protected]             X                                                       
X                               
[email protected]              X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]                                                            
        X                               
[email protected]           X                                                       
X                               
[email protected]                                                          
        X                       X       
[email protected]           X                                               
        X                               
[email protected]               X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]         X                                                       
                                
[email protected]                X                                               
        X                               
[email protected]           X                                               X       
                                
[email protected]          X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]                                                            
        X                               
[email protected]          X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]         X                                               X       
X                               
[email protected]           X                                               
X       X                               
[email protected]                X                                       
                X                               
[email protected]                                                          
X                                       
[email protected]             X                                               
        X                               
[email protected]             X                               X                       
                                
[email protected]               X                                               
        X                               
[email protected]               X                                               
        X                               
[email protected]          X                                                       
X                               
[email protected]                X                                               
        X                               
[email protected]          X                                                       
X                               
[email protected]            X                                               
        X                               
[email protected]           X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]              X                                               
        X                               
[email protected]         X                                               
        X                               
[email protected]              X                                               
        X                               
[email protected]               X                                       
                X                               
[email protected]            X                                                       
X                               
[email protected]            X                                                       
X                               
[email protected]                                                             
        X                               
[email protected]            X                                                       
X                               
[email protected]         X                                                       
X                               
[email protected]                                                                     
X                               
[email protected]                X                                               
        X                               
[email protected]                                     X                               
                                
[email protected]          X                                                       
X                               
[email protected]               X                                       
                X                               
[email protected]                X                                       
                X                               
[email protected]                                                                  
X                               
[email protected]                                                                   
X                               
[email protected]                                                            
        X                               
[email protected]                                   X                               
                                
[email protected]            X                                                       
X                               
[email protected]             X                                               
                                        
[email protected]                                                            
        X                               
[email protected]           X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]          X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]               X                                               
        X                               
[email protected]          X                                                       
                                
[email protected]                                                      X       
                                        
[email protected]                                                                  
                X               
[email protected]                                                                   
X                               
[email protected]                                                             
        X                               
[email protected]            X                                               
        X                               
[email protected]                                                              
        X                               
[email protected]                                                                    
X                               
[email protected]                                                              
        X                               
[email protected]                                                            
        X                               
[email protected]                                                                 
X                               
[email protected]                                                      
                X                               
[email protected]                                                            
        X                               
[email protected]                                                              
        X                               
[email protected]                                                      
                X                               
[email protected]                                                                 
X                               
[email protected]                                                                
        X                               
[email protected]                                                                
        X                               
[email protected]           X                                               
        X                               
[email protected]           X                                               
        X                               
[email protected]             X                                       
                X                               
[email protected]             X                                       
                X                               
[email protected]         X                                                       
X                               
[email protected]           X                                               
        X               X               
[email protected]                                                                
X                                       
[email protected]              X                                                       
X                               
[email protected]               X                                               
        X                               
[email protected]                X                                               
        X                               
[email protected]            X                                                       
X                               
[email protected]            X                                               
        X                               
[email protected]                                                                     
X                               
[email protected]+wasi-snapshot-preview1             X       X                       
                        X                               
[email protected]+wasi-0.2.2         X       X                                       
        X                               
[email protected]           X                                               
        X                               
[email protected]           X                                       
                X                               
[email protected]            X                                       
                X                               
[email protected]             X                                       
                X                               
[email protected]             X                               
                        X                               
[email protected]            X                                       
                X                               
[email protected]             X                                               
        X                               
[email protected]         X                                                       
X                               
[email protected]                                                            
                X                       
[email protected]           X                                                       
X                               
[email protected]               X                               
                        X                               
[email protected]             X                               
                        X                               
[email protected]         X                                                       
X                               
[email protected]            X                                               
        X                               
[email protected]            X                                               
        X                               
[email protected]               X                                       
                X                               
[email protected]               X                                       
                X                               
[email protected]             X                                               
        X                               
[email protected]         X                                               
        X                               
[email protected]           X                                               
        X                               
[email protected]          X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]             X                                               
        X                               
[email protected]         X                                               
        X                               
[email protected]         X                                       
                X                               
[email protected]            X                                       
                X                               
[email protected]                X                                       
                X                               
[email protected]            X                                       
                X                               
[email protected]               X                                       
                X                               
[email protected]              X                                       
                X                               
[email protected]          X                                       
                X                               
[email protected]             X                                       
                X                               
[email protected]          X       X                                       
        X                               
[email protected]          X                                                       
X                               
[email protected]                                                                
                        X               
[email protected]                                                                     
                X               
[email protected]                                                              
                        X               
[email protected]                X               X                               
        X                               
[email protected]         X               X                               
        X                               
[email protected]                                                                 
                X               
[email protected]                                                          
                        X               
[email protected]          X                                                       
X                               
[email protected]                                                                 
                X               
[email protected]                                                          
                        X               
[email protected]                                                                  
                                X
[email protected]                                                                    
X                               
[email protected]                X                                               
        X                               
[email protected]+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
-
-[![crates.io](https://img.shields.io/crates/v/iceberg-catalog-memory.svg)](https://crates.io/crates/iceberg-catalog-memory)
-[![docs.rs](https://img.shields.io/docsrs/iceberg-catalog-memory.svg)](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;
 

Reply via email to