Skip to content

Commit 560efc0

Browse files
potiukCloud Composer Team
authored and
Cloud Composer Team
committed
Fix Pandas2 compatibility for Hive (#32752)
Pandas2 removed deprecated iteritems() in a few classes with items() being replacement pandas-dev/pandas#37545 The Hive Hook used iteritems when converting to dataframes. Pandas2 upgrade has been enabled now by databricks-sql upgrade so it is now possible to use Pandas2 and update our constraints. GitOrigin-RevId: 00aa6ea72c4d72df6c62ac1dda9bb145bece2e1c
1 parent e1a7c2d commit 560efc0

File tree

1 file changed

+1
-1
lines changed
  • airflow/providers/apache/hive/hooks

1 file changed

+1
-1
lines changed

airflow/providers/apache/hive/hooks/hive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def _infer_field_types_from_df(df: pandas.DataFrame) -> dict[Any, Any]:
376376
}
377377

378378
order_type = OrderedDict()
379-
for col, dtype in df.dtypes.iteritems():
379+
for col, dtype in df.dtypes.items():
380380
order_type[col] = dtype_kind_hive_type[dtype.kind]
381381
return order_type
382382

0 commit comments

Comments
 (0)