Skip to content

Commit d4703f4

Browse files
committed
Add Puffin FileMetadata
1 parent 3b71074 commit d4703f4

8 files changed

+982
-3
lines changed

crates/puffin/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ license = { workspace = true }
2929
keywords = ["iceberg", "puffin"]
3030

3131
[dependencies]
32+
bytes = { workspace = true }
3233
iceberg = { workspace = true }
34+
once_cell = { workspace = true }
35+
serde = { workspace = true }
36+
serde_json = { workspace = true }
3337
zstd = { workspace = true }
3438

3539
[dev-dependencies]
40+
tempfile = { workspace = true }
3641
tokio = { workspace = true }

crates/puffin/src/compression.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
// under the License.
1717

1818
use iceberg::{Error, ErrorKind, Result};
19+
use serde::{Deserialize, Serialize};
1920

20-
#[derive(Debug, PartialEq, Eq, Clone, Copy, Default)]
21+
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone, Copy)]
22+
#[serde(rename_all = "lowercase")]
23+
#[derive(Default)]
2124
/// Data compression formats
22-
pub enum CompressionCodec {
25+
pub(crate) enum CompressionCodec {
2326
#[default]
2427
/// No compression
2528
None,

crates/puffin/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@
2222
#![allow(dead_code)]
2323

2424
mod compression;
25-
pub use compression::CompressionCodec;
25+
mod metadata;
26+
27+
#[cfg(test)]
28+
mod test_utils;

0 commit comments

Comments
 (0)