Skip to content

Commit 5f517e1

Browse files
committed
feat: introduce catalog api
1 parent dcfe3c8 commit 5f517e1

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

crates/paimon/src/catalog/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ impl fmt::Debug for Identifier {
102102

103103
use async_trait::async_trait;
104104

105-
use crate::spec::SchemaChange;
106-
use crate::Result;
105+
use crate::spec::{Schema, SchemaChange};
107106
use crate::table::Table;
107+
use crate::Result;
108108

109109
/// Catalog API for reading and writing metadata (databases, tables) in Paimon.
110110
///
@@ -210,5 +210,3 @@ pub trait Catalog: Send + Sync {
210210
ignore_if_not_exists: bool,
211211
) -> Result<()>;
212212
}
213-
214-

crates/paimon/src/error.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ pub enum Error {
6868
FileIndexFormatInvalid { message: String },
6969

7070
// ======================= catalog errors ===============================
71-
7271
#[snafu(display("Database {} already exists.", database))]
7372
DatabaseAlreadyExist { database: String },
7473
#[snafu(display("Database {} does not exist.", database))]
@@ -80,15 +79,9 @@ pub enum Error {
8079
#[snafu(display("Table {} does not exist.", full_name))]
8180
TableNotExist { full_name: String },
8281
#[snafu(display("Column {} already exists in table {}.", column, full_name))]
83-
ColumnAlreadyExist {
84-
full_name: String,
85-
column: String,
86-
},
82+
ColumnAlreadyExist { full_name: String, column: String },
8783
#[snafu(display("Column {} does not exist in table {}.", column, full_name))]
88-
ColumnNotExist {
89-
full_name: String,
90-
column: String,
91-
},
84+
ColumnNotExist { full_name: String, column: String },
9285
#[snafu(display("Invalid identifier: {}", message))]
9386
IdentifierInvalid { message: String },
9487
}

crates/paimon/src/table.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717

1818
//! Table API for Apache Paimon
1919
20-
use crate::io::FileIO;
21-
2220
/// Table represents a table in the catalog.
2321
#[derive(Debug, Clone)]
24-
pub struct Table {
25-
file_io: FileIO,
26-
}
22+
pub struct Table {}

0 commit comments

Comments
 (0)