Skip to content

Commit ef6b981

Browse files
Fokkokevinzwang
authored andcommitted
fix: Don't use _position_to_field_name (#3917)
Don't use internal fields :) I want to remove this one in apache/iceberg-python#1768. It should be okay since the `Record` also has a `__len__`.
1 parent 08f7219 commit ef6b981

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

daft/iceberg/iceberg_scan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _iceberg_record_to_partition_spec(
129129
) -> daft.recordbatch.RecordBatch | None:
130130
partition_fields = iceberg_partition_spec_to_fields(self._table.schema(), spec)
131131
arrays = dict()
132-
assert len(record._position_to_field_name) == len(partition_fields)
132+
assert len(record) == len(partition_fields)
133133
for idx, pfield in enumerate(partition_fields):
134134
field = Field._from_pyfield(pfield.field)
135135
field_name = field.name

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ azure = []
2929
deltalake = ["deltalake"]
3030
gcp = []
3131
hudi = ["pyarrow >= 8.0.0"]
32-
iceberg = ["pyiceberg >= 0.4.0", "packaging"]
32+
iceberg = ["pyiceberg >= 0.7.0", "packaging"]
3333
lance = ["lancedb"]
3434
numpy = ["numpy"]
3535
pandas = ["pandas"]

0 commit comments

Comments
 (0)