Skip to content

Commit 75a22b1

Browse files
authored
Merge pull request #214 from Embucket/aosipov/allow_writes_for_structs
Allow parquet writes for Struct data type
2 parents b57909e + 41d1635 commit 75a22b1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

iceberg-rust-spec/src/spec/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl StructType {
319319
.iter()
320320
.find(|field| field.name == *part);
321321

322-
if i == parts.len() - 1 || current_field.is_none() {
322+
if i == parts.len() - 1 || current_field.is_some() {
323323
return current_field;
324324
}
325325

iceberg-rust/src/file_format/parquet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub fn parquet_to_datafile(
6363
for column in row_group.columns() {
6464
let column_name = column.column_descr().name();
6565
let id = schema
66-
.get_name(column_name)
66+
.get_name(&column.column_path().parts().join("."))
6767
.ok_or_else(|| Error::Schema(column_name.to_string(), "".to_string()))?
6868
.id;
6969
column_sizes

0 commit comments

Comments
 (0)