diff --git a/crates/core/src/kernel/models/actions.rs b/crates/core/src/kernel/models/actions.rs index 6ec8fc11fb..bfcd9ec757 100644 --- a/crates/core/src/kernel/models/actions.rs +++ b/crates/core/src/kernel/models/actions.rs @@ -86,7 +86,7 @@ impl Metadata { configuration, name: None, description: None, - created_time: None, + created_time: Some(chrono::Utc::now().timestamp_millis()), }) } diff --git a/crates/core/src/operations/write.rs b/crates/core/src/operations/write.rs index 36dcec5b70..5deaaa1393 100644 --- a/crates/core/src/operations/write.rs +++ b/crates/core/src/operations/write.rs @@ -1588,6 +1588,15 @@ mod tests { let names = fields.map(|f| f.name()).collect::>(); assert_eq!(names, vec!["id", "value", "modified", "inserted_by"]); + // + let metadata = table + .metadata() + .expect("Failed to retrieve updated metadata"); + assert_ne!( + None, metadata.created_time, + "Created time should be the milliseconds since epoch of when the action was created" + ); + let write_metrics: WriteMetrics = get_write_metrics(table.clone()).await; assert_common_write_metrics(write_metrics); }