Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions crates/core/src/kernel/snapshot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use itertools::Itertools;
use object_store::path::Path;
use object_store::ObjectStore;
use tokio::task::spawn_blocking;
use url::Url;

use super::{Action, CommitInfo, Metadata, Protocol, Remove};
use crate::kernel::arrow::engine_ext::{ScanExt, SnapshotExt};
Expand Down Expand Up @@ -69,8 +68,6 @@ pub struct Snapshot {
config: DeltaTableConfig,
/// Logical table schema
schema: SchemaRef,
/// Fully qualified URL of the table
table_url: Url,
}

impl Snapshot {
Expand Down Expand Up @@ -118,7 +115,6 @@ impl Snapshot {
inner: snapshot,
config,
schema,
table_url: log_store.config().location.clone(),
})
}

Expand All @@ -136,7 +132,7 @@ impl Snapshot {
store.put(&uri, data.into()).await?;
}

let table_url = Url::parse("memory:///").unwrap();
let table_url = url::Url::parse("memory:///").unwrap();

let log_store = default_logstore(
store.clone(),
Expand All @@ -154,7 +150,6 @@ impl Snapshot {
inner: snapshot,
config: Default::default(),
schema,
table_url,
},
log_store,
))
Expand Down Expand Up @@ -221,7 +216,7 @@ impl Snapshot {

/// Get the table root of the snapshot
pub(crate) fn table_root_path(&self) -> DeltaResult<Path> {
Ok(Path::from_url_path(self.table_url.path())?)
Ok(Path::from_url_path(self.inner.table_root().path())?)
}

/// Well known properties of the table
Expand Down
3 changes: 1 addition & 2 deletions crates/core/src/kernel/snapshot/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Serialize for Snapshot {
let mut seq = serializer.serialize_seq(None)?;

seq.serialize_element(&self.version())?;
seq.serialize_element(&self.table_url)?;
seq.serialize_element(&self.inner.table_root())?;
seq.serialize_element(&self.protocol())?;
seq.serialize_element(&self.metadata())?;
seq.serialize_element(&ascending_commit_files)?;
Expand Down Expand Up @@ -202,7 +202,6 @@ impl<'de> Visitor<'de> for SnapshotVisitor {

Ok(Snapshot {
inner: Arc::new(snapshot),
table_url,
schema: Arc::new(schema),
config,
})
Expand Down
Loading