Skip to content

Commit de93cea

Browse files
authored
Update pyiceberg/partitioning.py
1 parent ac66149 commit de93cea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyiceberg/partitioning.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,10 @@ def check_compatible(self, schema: Schema, allow_missing_fields: bool = False) -
271271
if not source_type.is_primitive:
272272
raise ValidationError(f"Cannot partition by non-primitive source field: {source_field}")
273273
if not field.transform.can_transform(source_type):
274-
raise ValidationError(f"Invalid source type {source_type} for transform: {field.transform}")
274+
raise ValidationError(
275+
f"Invalid source field {source_field.name} with type {source_type} "
276+
+ f"for transform: {field.transform}"
277+
)
275278

276279
# The only valid parent types for a PartitionField are StructTypes. This must be checked recursively
277280
parent_id = parents.get(field.source_id)

0 commit comments

Comments
 (0)