Skip to content

Commit f1ac664

Browse files
authored
update iceberg-rust (#1889)
* update iceberg-rust * fix statistics test
1 parent eae85e7 commit f1ac664

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

Cargo.lock

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ datafusion-expr = { version = "50.0.0" }
5252
datafusion-functions-json = { git = "https://github.com/Embucket/datafusion-functions-json.git", rev = "439cbd2282504c3ffaf262f1ffdb530a0fb1a151" }
5353
datafusion-macros = { version = "50.0.0" }
5454
datafusion-physical-plan = { version = "50.0.0" }
55-
datafusion_iceberg = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "5664a94fcd7350c5e381aaeaf018bc0b20ce03b6" }
55+
datafusion_iceberg = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "1eeb4515446119dd3b4dbb7ebd2f70ae5b4f827d" }
5656
futures = { version = "0.3" }
5757
http = "1.2"
5858
http-body-util = "0.1.0"
5959
iceberg = { git = "https://github.com/apache/iceberg-rust.git", rev="7a5ad1fcaf00d4638857812bab788105f6c60573"}
60-
iceberg-rest-catalog = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "5664a94fcd7350c5e381aaeaf018bc0b20ce03b6" }
61-
iceberg-rust = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "5664a94fcd7350c5e381aaeaf018bc0b20ce03b6" }
62-
iceberg-rust-spec = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "5664a94fcd7350c5e381aaeaf018bc0b20ce03b6" }
63-
iceberg-s3tables-catalog = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "5664a94fcd7350c5e381aaeaf018bc0b20ce03b6" }
60+
iceberg-rest-catalog = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "1eeb4515446119dd3b4dbb7ebd2f70ae5b4f827d" }
61+
iceberg-rust = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "1eeb4515446119dd3b4dbb7ebd2f70ae5b4f827d" }
62+
iceberg-rust-spec = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "1eeb4515446119dd3b4dbb7ebd2f70ae5b4f827d" }
63+
iceberg-s3tables-catalog = { git = "https://github.com/Embucket/iceberg-rust.git", rev = "1eeb4515446119dd3b4dbb7ebd2f70ae5b4f827d" }
6464
indexmap = "2.7.1"
6565
jsonwebtoken = "9.3.1"
6666
lazy_static = { version = "1.5" }

crates/api-ui/src/tests/tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async fn test_ui_tables() {
219219
assert_eq!(http::StatusCode::OK, res.status());
220220
let TableStatisticsResponse(table) = res.json().await.unwrap();
221221
assert_eq!(0, table.total_bytes);
222-
assert_eq!(0, table.total_rows);
222+
assert_eq!(2, table.total_rows);
223223

224224
//Create three more tables
225225
let query_payload = QueryCreatePayload {

crates/core-executor/src/datafusion/physical_plan/merge.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ impl ExecutionPlan for MergeIntoCOWSinkExec {
157157
let branch = self.target.branch.clone();
158158
let schema = schema.clone();
159159
async move {
160-
let mut lock = tabular.write().await;
161-
let table = if let Tabular::Table(table) = &mut *lock {
160+
#[allow(clippy::unwrap_used)]
161+
let value = tabular.write().unwrap().clone();
162+
let mut table = if let Tabular::Table(table) = value {
162163
Ok(table)
163164
} else {
164165
Err(IcebergError::InvalidFormat("database entity".to_string()))
@@ -167,7 +168,7 @@ impl ExecutionPlan for MergeIntoCOWSinkExec {
167168

168169
// Write recordbatches into parquet files on object-storage
169170
let datafiles =
170-
write_parquet_data_files(table, batches, &context, branch.as_deref()).await?;
171+
write_parquet_data_files(&table, batches, &context, branch.as_deref()).await?;
171172

172173
let matching_files = {
173174
#[allow(clippy::unwrap_used)]

crates/core-executor/src/query.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3405,8 +3405,8 @@ fn merge_clause_expression(merge_clause: &MergeClause) -> Result<DFExpr> {
34053405
async fn target_filter_expression(
34063406
table: &DataFusionTable,
34073407
) -> Result<Option<datafusion_expr::Expr>> {
3408-
let lock = table.tabular.read().await;
3409-
let table = match &*lock {
3408+
#[allow(clippy::unwrap_used)]
3409+
let table = match table.tabular.read().unwrap().clone() {
34103410
Tabular::Table(table) => Ok(table),
34113411
_ => MergeSourceNotSupportedSnafu.fail(),
34123412
}?;

0 commit comments

Comments
 (0)