Skip to content

Commit 3925336

Browse files
committed
v1 data files should have a defualt DATA content type
1 parent 69686ba commit 3925336

File tree

1 file changed

+10
-0
lines changed
  • crates/iceberg/src/spec/manifest

1 file changed

+10
-0
lines changed

crates/iceberg/src/spec/manifest/entry.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,16 @@ pub(super) fn manifest_schema_v2(partition_type: &StructType) -> Result<AvroSche
563563

564564
fn data_file_fields_v1(partition_type: &StructType) -> Vec<NestedFieldRef> {
565565
vec![
566+
// Content is always 1.
567+
Arc::new(NestedField::builder()
568+
.id(134)
569+
.name("content")
570+
.required(false)
571+
.field_type(Type::Primitive(PrimitiveType::Int))
572+
.initial_default(Some(serde_json::Value::Number(1.into())))
573+
.write_default(Some(serde_json::Value::Number(1.into())))
574+
.build()
575+
),
566576
FILE_PATH.clone(),
567577
FILE_FORMAT.clone(),
568578
Arc::new(NestedField::required(

0 commit comments

Comments
 (0)