You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/07/21 17:04:41 UTC
[airflow] branch main updated: Fix Pandas2 compatibility for Hive (#32752)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 00aa6ea72c Fix Pandas2 compatibility for Hive (#32752)
00aa6ea72c is described below
commit 00aa6ea72c4d72df6c62ac1dda9bb145bece2e1c
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Fri Jul 21 19:04:30 2023 +0200
Fix Pandas2 compatibility for Hive (#32752)
Pandas2 removed deprecated iteritems() in a few classes with items()
being replacement https://github.com/pandas-dev/pandas/pull/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.
---
airflow/providers/apache/hive/hooks/hive.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/providers/apache/hive/hooks/hive.py b/airflow/providers/apache/hive/hooks/hive.py
index c67901445a..8e81592f79 100644
--- a/airflow/providers/apache/hive/hooks/hive.py
+++ b/airflow/providers/apache/hive/hooks/hive.py
@@ -376,7 +376,7 @@ class HiveCliHook(BaseHook):
}
order_type = OrderedDict()
- for col, dtype in df.dtypes.iteritems():
+ for col, dtype in df.dtypes.items():
order_type[col] = dtype_kind_hive_type[dtype.kind]
return order_type