Skip to content

Commit

Permalink
Fix: MappedLocalTime should not be exposed (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-thiel committed Aug 7, 2024
1 parent ded5926 commit 9b4ea11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/iceberg/src/spec/view_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ use std::fmt::{Display, Formatter};
use std::sync::Arc;

use _serde::ViewMetadataEnum;
use chrono::{DateTime, MappedLocalTime, TimeZone, Utc};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use serde_repr::{Deserialize_repr, Serialize_repr};
use uuid::Uuid;

use super::view_version::{ViewVersion, ViewVersionId, ViewVersionRef};
use super::{SchemaId, SchemaRef};
use crate::catalog::ViewCreation;
use crate::error::Result;
use crate::error::{timestamp_ms_to_utc, Result};

/// Reference to [`ViewMetadata`].
pub type ViewMetadataRef = Arc<ViewMetadata>;
Expand Down Expand Up @@ -238,8 +238,8 @@ impl ViewVersionLog {
}

/// Returns the last updated timestamp as a DateTime<Utc> with millisecond precision.
pub fn timestamp(self) -> MappedLocalTime<DateTime<Utc>> {
Utc.timestamp_millis_opt(self.timestamp_ms)
pub fn timestamp(self) -> Result<DateTime<Utc>> {
timestamp_ms_to_utc(self.timestamp_ms)
}
}

Expand Down

0 comments on commit 9b4ea11

Please sign in to comment.