Skip to content

Commit 29d0051

Browse files
committed
Rename input_fields to fields
1 parent 6388d85 commit 29d0051

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

crates/iceberg/src/puffin/metadata.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ pub(crate) struct BlobMetadata {
3737
/// See blob types: https://iceberg.apache.org/puffin-spec/#blob-types
3838
pub(crate) r#type: String,
3939
/// List of field IDs the blob was computed for; the order of items is used to compute sketches stored in the blob.
40-
#[serde(rename = "fields")]
41-
pub(crate) input_fields: Vec<i32>,
40+
pub(crate) fields: Vec<i32>,
4241
/// ID of the Iceberg table's snapshot the blob was computed from
4342
pub(crate) snapshot_id: i64,
4443
/// Sequence number of the Iceberg table's snapshot the blob was computed from
@@ -658,7 +657,7 @@ mod tests {
658657
blobs: vec![
659658
BlobMetadata {
660659
r#type: "type-a".to_string(),
661-
input_fields: vec![1],
660+
fields: vec![1],
662661
snapshot_id: 14,
663662
sequence_number: 3,
664663
offset: 4,
@@ -668,7 +667,7 @@ mod tests {
668667
},
669668
BlobMetadata {
670669
r#type: "type-bbb".to_string(),
671-
input_fields: vec![2, 3, 4],
670+
fields: vec![2, 3, 4],
672671
snapshot_id: 77,
673672
sequence_number: 4,
674673
offset: 21474836470000,
@@ -711,7 +710,7 @@ mod tests {
711710
FileMetadata {
712711
blobs: vec![BlobMetadata {
713712
r#type: "type-a".to_string(),
714-
input_fields: vec![1],
713+
fields: vec![1],
715714
snapshot_id: 14,
716715
sequence_number: 3,
717716
offset: 4,

crates/iceberg/src/puffin/test_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub(crate) const METRIC_BLOB_0_SEQUENCE_NUMBER: i64 = 1;
7272
pub(crate) fn zstd_compressed_metric_blob_0_metadata() -> BlobMetadata {
7373
BlobMetadata {
7474
r#type: METRIC_BLOB_0_TYPE.to_string(),
75-
input_fields: METRIC_BLOB_0_INPUT_FIELDS.to_vec(),
75+
fields: METRIC_BLOB_0_INPUT_FIELDS.to_vec(),
7676
snapshot_id: METRIC_BLOB_0_SNAPSHOT_ID,
7777
sequence_number: METRIC_BLOB_0_SEQUENCE_NUMBER,
7878
offset: 4,
@@ -85,7 +85,7 @@ pub(crate) fn zstd_compressed_metric_blob_0_metadata() -> BlobMetadata {
8585
pub(crate) fn uncompressed_metric_blob_0_metadata() -> BlobMetadata {
8686
BlobMetadata {
8787
r#type: METRIC_BLOB_0_TYPE.to_string(),
88-
input_fields: METRIC_BLOB_0_INPUT_FIELDS.to_vec(),
88+
fields: METRIC_BLOB_0_INPUT_FIELDS.to_vec(),
8989
snapshot_id: METRIC_BLOB_0_SNAPSHOT_ID,
9090
sequence_number: METRIC_BLOB_0_SEQUENCE_NUMBER,
9191
offset: 4,
@@ -103,7 +103,7 @@ pub(crate) const METRIC_BLOB_1_SEQUENCE_NUMBER: i64 = 1;
103103
pub(crate) fn uncompressed_metric_blob_1_metadata() -> BlobMetadata {
104104
BlobMetadata {
105105
r#type: METRIC_BLOB_1_TYPE.to_string(),
106-
input_fields: METRIC_BLOB_1_INPUT_FIELDS.to_vec(),
106+
fields: METRIC_BLOB_1_INPUT_FIELDS.to_vec(),
107107
snapshot_id: METRIC_BLOB_1_SNAPSHOT_ID,
108108
sequence_number: METRIC_BLOB_1_SEQUENCE_NUMBER,
109109
offset: 13,
@@ -116,7 +116,7 @@ pub(crate) fn uncompressed_metric_blob_1_metadata() -> BlobMetadata {
116116
pub(crate) fn zstd_compressed_metric_blob_1_metadata() -> BlobMetadata {
117117
BlobMetadata {
118118
r#type: METRIC_BLOB_1_TYPE.to_string(),
119-
input_fields: METRIC_BLOB_1_INPUT_FIELDS.to_vec(),
119+
fields: METRIC_BLOB_1_INPUT_FIELDS.to_vec(),
120120
snapshot_id: METRIC_BLOB_1_SNAPSHOT_ID,
121121
sequence_number: METRIC_BLOB_1_SEQUENCE_NUMBER,
122122
offset: 26,

0 commit comments

Comments
 (0)