This is an automated email from the ASF dual-hosted git repository.
eladkal 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 1969eaf2de Replace single element slice by next() in hive provider
(#33937)
1969eaf2de is described below
commit 1969eaf2de4f09f4ce3ac14cf8f3c78022f9212a
Author: Hussein Awala <[email protected]>
AuthorDate: Thu Aug 31 07:42:22 2023 +0200
Replace single element slice by next() in hive provider (#33937)
---
airflow/providers/apache/hive/macros/hive.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/providers/apache/hive/macros/hive.py
b/airflow/providers/apache/hive/macros/hive.py
index 71e0661697..24868f28ad 100644
--- a/airflow/providers/apache/hive/macros/hive.py
+++ b/airflow/providers/apache/hive/macros/hive.py
@@ -106,7 +106,7 @@ def closest_ds_partition(
partitions = hive_hook.get_partitions(schema=schema, table_name=table)
if not partitions:
return None
- part_vals = [list(p.values())[0] for p in partitions]
+ part_vals = [next(iter(p.values())) for p in partitions]
if ds in part_vals:
return ds
else: