[ 
https://issues.apache.org/jira/browse/AIRFLOW-5496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930122#comment-16930122
 ] 

ASF subversion and git services commented on AIRFLOW-5496:
----------------------------------------------------------

Commit 54bdb97b216670ca4df123900aa93eaac14de252 in airflow's branch 
refs/heads/master from daniela-BV
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=54bdb97 ]

AIRFLOW-5496: delete unneeded variable assignment (#6110)



> 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
>
> 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.2#803003)

Reply via email to