Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fvaleye committed Apr 28, 2021
1 parent 64d8cad commit fc5c3b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/tests/test_table_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def test_vacuum_dry_run_simple_table():
table_path = "../rust/tests/data/delta-0.2.0"
dt = DeltaTable(table_path)
retention_periods = 169
assert dt.vacuum(retention_periods) == [
tombstones = dt.vacuum(retention_periods)
tombstones.sort()
assert tombstones == [
"../rust/tests/data/delta-0.2.0/part-00000-512e1537-8aaa-4193-b8b4-bef3de0de409-c000.snappy.parquet",
"../rust/tests/data/delta-0.2.0/part-00000-b44fcdb0-8b06-4f3a-8606-f8311a96f6dc-c000.snappy.parquet",
"../rust/tests/data/delta-0.2.0/part-00001-185eca06-e017-4dea-ae49-fc48b973e37e-c000.snappy.parquet",
Expand Down
4 changes: 4 additions & 0 deletions rust/src/delta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ use super::storage;
use super::storage::{StorageBackend, StorageError, UriError};
use uuid::Uuid;

/// Metadata for a checkpoint file
#[derive(Serialize, Deserialize, Debug, Default, Clone, Copy)]
pub struct CheckPoint {
/// Delta table version
version: DeltaDataTypeVersion, // 20 digits decimals
size: DeltaDataTypeLong,
parts: Option<u32>, // 10 digits decimals
Expand Down Expand Up @@ -765,6 +767,8 @@ impl DeltaTable {
Ok(tombstones)
}

/// Return table schema parsed from transaction log. Return None if table hasn't been loaded or
/// no metadata was found in the log.
pub fn schema(&self) -> Option<&Schema> {
self.state.current_metadata.as_ref().map(|m| &m.schema)
}
Expand Down

0 comments on commit fc5c3b6

Please sign in to comment.