Skip to content

Commit 19598c3

Browse files
committed
rename vars
1 parent 6bd01d4 commit 19598c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pyiceberg/table/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ def _check_schema_compatible(table_schema: Schema, other_schema: "pa.Schema") ->
180180
f"PyArrow table contains more columns: {', '.join(sorted(additional_names))}. Update the schema first (hint, use union_by_name)."
181181
) from e
182182

183-
missing_table_schema_fields = {field for field in other_schema.fields if field not in table_schema.fields}
184-
required_table_schema_fields = {field for field in table_schema.fields if field.required}
185-
missing_required_fields = {field for field in required_table_schema_fields if field not in other_schema.fields}
186-
if missing_table_schema_fields or missing_required_fields:
183+
fields_missing_from_table = {field for field in other_schema.fields if field not in table_schema.fields}
184+
required_fields_in_table = {field for field in table_schema.fields if field.required}
185+
missing_required_fields_in_other = {field for field in required_fields_in_table if field not in other_schema.fields}
186+
if fields_missing_from_table or missing_required_fields_in_other:
187187
from rich.console import Console
188188
from rich.table import Table as RichTable
189189

0 commit comments

Comments
 (0)