Skip to content

Commit

Permalink
Replace single element slice by next() in hive provider (#33937)
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala committed Aug 31, 2023
1 parent b497234 commit 1969eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/providers/apache/hive/macros/hive.py
Expand Up @@ -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:
Expand Down

0 comments on commit 1969eaf

Please sign in to comment.