From 58240a9e5c7998f987ec98aca00bb709b77995af Mon Sep 17 00:00:00 2001 From: Peter Ke Date: Fri, 4 Oct 2024 17:30:40 -0700 Subject: [PATCH] fix --- crates/core/src/operations/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/core/src/operations/write.rs b/crates/core/src/operations/write.rs index 36dcec5b70..a4dd1353a2 100644 --- a/crates/core/src/operations/write.rs +++ b/crates/core/src/operations/write.rs @@ -1075,7 +1075,7 @@ impl std::future::IntoFuture for WriteBuilder { actions.push(protocol.into()) } - if schema != table_schema { + if try_cast_batch(schema.fields(), table_schema.fields()).is_err() { let mut metadata = snapshot.metadata().clone(); let delta_schema: StructType = schema.as_ref().try_into()?; metadata.schema_string = serde_json::to_string(&delta_schema)?;