Skip to content

Commit fbc0cdb

Browse files
committed
Pass in type explicitly for initial-default
1 parent 8042d82 commit fbc0cdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyiceberg/io/pyarrow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ def struct(
18051805
elif field.initial_default is None:
18061806
field_arrays.append(pa.nulls(len(struct_array), type=arrow_type))
18071807
else:
1808-
field_arrays.append(pa.repeat(field.initial_default, len(struct_array)))
1808+
field_arrays.append(pa.repeat(pa.scalar(field.initial_default, type=arrow_type), len(struct_array)))
18091809
fields.append(self._construct_field(field, arrow_type))
18101810
else:
18111811
raise ResolveError(f"Field is required, and could not be found in the file: {field}")

0 commit comments

Comments
 (0)