[
https://issues.apache.org/jira/browse/AIRFLOW-5496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kaxil Naik resolved AIRFLOW-5496.
---------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
> hive_stats_operator: Unneeded variable assignment
> -------------------------------------------------
>
> Key: AIRFLOW-5496
> URL: https://issues.apache.org/jira/browse/AIRFLOW-5496
> Project: Apache Airflow
> Issue Type: Bug
> Components: operators
> Affects Versions: 1.10.6
> Reporter: Jakob Homan
> Priority: Minor
> Labels: ccoss2019, newbie
> Fix For: 2.0.0
>
>
> Note: This ticket's being created to facilitate a new contributor's workshop
> for Airflow. After the workshop has completed, I'll mark these all available
> for anyone that might like to take them on.
> The variable {{d}} is assigned to an empty dictionary and the immediately
> reassigned in the if/else block. We should remove the unneeded first
> assignment.
> airflow/operators/hive_stats_operator.py:116
> {code:java}
> for col, col_type in list(field_types.items()):
> d = {}
> if self.assignment_func:
> d = self.assignment_func(col, col_type)
> if d is None:
> d = self.get_default_exprs(col, col_type)
> else:
> d = self.get_default_exprs(col, col_type)
> exprs.update(d) {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)