Skip to content

Commit

Permalink
fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jrose committed Jan 13, 2025
1 parent 7b703d9 commit 180ba3f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def schema_expression(data_type: DataType, is_nullable: bool) -> str:
if isinstance(data_type, StructType):
if data_type.structured:
schema_strings = []
for field in data_type.fields:
for field in data_type.fields or []:
# Even if nulls are allowed the cast will fail due to schema mismatch when passed a null field.
schema_strings += [
f"'{field.name}'",
Expand Down

0 comments on commit 180ba3f

Please sign in to comment.