Skip to content

Commit 00aa6ea

Browse files
authored
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.
1 parent 5b082c3 commit 00aa6ea

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)