Skip to content

Commit

Permalink
Prep 0.4.0 release (#809)
Browse files Browse the repository at this point in the history
* deprecate functions

* bump version to 0.4.0

* revert
  • Loading branch information
sungwy authored Dec 17, 2024
1 parent 43501ff commit f90dbff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 63 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ members = [
exclude = ["bindings/python"]

[workspace.package]
version = "0.3.0"
version = "0.4.0"
edition = "2021"
homepage = "https://rust.iceberg.apache.org/"

Expand Down Expand Up @@ -62,11 +62,11 @@ either = "1"
env_logger = "0.11.0"
fnv = "1"
futures = "0.3"
iceberg = { version = "0.3.0", path = "./crates/iceberg" }
iceberg-catalog-rest = { version = "0.3.0", path = "./crates/catalog/rest" }
iceberg-catalog-hms = { version = "0.3.0", path = "./crates/catalog/hms" }
iceberg-catalog-memory = { version = "0.3.0", path = "./crates/catalog/memory" }
iceberg-datafusion = { version = "0.3.0", path = "./crates/integrations/datafusion" }
iceberg = { version = "0.4.0", path = "./crates/iceberg" }
iceberg-catalog-rest = { version = "0.4.0", path = "./crates/catalog/rest" }
iceberg-catalog-hms = { version = "0.4.0", path = "./crates/catalog/hms" }
iceberg-catalog-memory = { version = "0.4.0", path = "./crates/catalog/memory" }
iceberg-datafusion = { version = "0.4.0", path = "./crates/integrations/datafusion" }
itertools = "0.13"
log = "0.4"
mockito = "1"
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

Rust implementation of [Apache Iceberg™](https://iceberg.apache.org/).

Working on [v0.3.0 Release Milestone](https://github.com/apache/iceberg-rust/milestone/2)

## Components

The Apache Iceberg Rust project is composed of the following components:
Expand Down
36 changes: 0 additions & 36 deletions crates/catalog/rest/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ impl RestCatalogConfig {
pub(crate) fn get_token_endpoint(&self) -> String {
if let Some(oauth2_uri) = self.props.get("oauth2-server-uri") {
oauth2_uri.to_string()
} else if let Some(auth_url) = self.props.get("rest.authorization-url") {
log::warn!(
"'rest.authorization-url' is deprecated and will be removed in version 0.4.0. \
Please use 'oauth2-server-uri' instead."
);
auth_url.to_string()
} else {
[&self.uri, PATH_V1, "oauth", "tokens"].join("/")
}
Expand Down Expand Up @@ -924,36 +918,6 @@ mod tests {
assert_eq!(headers, expected_headers);
}

#[tokio::test]
async fn test_oauth_with_deprecated_auth_url() {
let mut server = Server::new_async().await;
let config_mock = create_config_mock(&mut server).await;

let mut auth_server = Server::new_async().await;
let auth_server_path = "/some/path";
let oauth_mock = create_oauth_mock_with_path(&mut auth_server, auth_server_path).await;

let mut props = HashMap::new();
props.insert("credential".to_string(), "client1:secret1".to_string());
props.insert(
"rest.authorization-url".to_string(),
format!("{}{}", auth_server.url(), auth_server_path).to_string(),
);

let catalog = RestCatalog::new(
RestCatalogConfig::builder()
.uri(server.url())
.props(props)
.build(),
);

let token = catalog.context().await.unwrap().client.token().await;

oauth_mock.assert_async().await;
config_mock.assert_async().await;
assert_eq!(token, Some("ey000000000000".to_string()));
}

#[tokio::test]
async fn test_oauth_with_oauth2_server_uri() {
let mut server = Server::new_async().await;
Expand Down
8 changes: 0 additions & 8 deletions crates/iceberg/src/catalog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,6 @@ pub enum TableUpdate {
AddSchema {
/// The schema to add.
schema: Schema,
/// The last column id of the table.
#[deprecated(
since = "0.3.0",
note = "This field is handled internally, and should not be part of the update."
)]
last_column_id: Option<i32>,
},
/// Set table's current schema
#[serde(rename_all = "kebab-case")]
Expand Down Expand Up @@ -1301,7 +1295,6 @@ mod tests {
"#,
TableUpdate::AddSchema {
schema: test_schema.clone(),
last_column_id: Some(3),
},
);

Expand Down Expand Up @@ -1340,7 +1333,6 @@ mod tests {
"#,
TableUpdate::AddSchema {
schema: test_schema.clone(),
last_column_id: None,
},
);
}
Expand Down
13 changes: 2 additions & 11 deletions crates/iceberg/src/spec/table_metadata_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ impl TableMetadataBuilder {
if schema_found {
if self.last_added_schema_id != Some(new_schema_id) {
self.changes.push(TableUpdate::AddSchema {
last_column_id: Some(self.metadata.last_column_id),
schema: schema.clone(),
});
self.last_added_schema_id = Some(new_schema_id);
Expand All @@ -609,10 +608,7 @@ impl TableMetadataBuilder {
.schemas
.insert(new_schema_id, schema.clone().into());

self.changes.push(TableUpdate::AddSchema {
schema,
last_column_id: Some(self.metadata.last_column_id),
});
self.changes.push(TableUpdate::AddSchema { schema });

self.last_added_schema_id = Some(new_schema_id);

Expand Down Expand Up @@ -1453,10 +1449,7 @@ mod tests {
TableUpdate::SetLocation {
location: TEST_LOCATION.to_string()
},
TableUpdate::AddSchema {
last_column_id: Some(LAST_ASSIGNED_COLUMN_ID),
schema: schema(),
},
TableUpdate::AddSchema { schema: schema() },
TableUpdate::SetCurrentSchema { schema_id: -1 },
TableUpdate::AddSpec {
// Because this is a new tables, field-ids are assigned
Expand Down Expand Up @@ -1509,7 +1502,6 @@ mod tests {
location: TEST_LOCATION.to_string()
},
TableUpdate::AddSchema {
last_column_id: Some(0),
schema: Schema::builder().build().unwrap(),
},
TableUpdate::SetCurrentSchema { schema_id: -1 },
Expand Down Expand Up @@ -1751,7 +1743,6 @@ mod tests {
Some(&Arc::new(added_schema.clone()))
);
pretty_assertions::assert_eq!(build_result.changes[0], TableUpdate::AddSchema {
last_column_id: Some(4),
schema: added_schema
});
assert_eq!(build_result.changes[1], TableUpdate::SetCurrentSchema {
Expand Down

0 comments on commit f90dbff

Please sign in to comment.