You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/01/22 06:54:20 UTC

[GitHub] zhongjiajie commented on a change in pull request #4560: [AIRFLOW-3733] Init variable i avoid raise NameError

zhongjiajie commented on a change in pull request #4560: [AIRFLOW-3733] Init variable i avoid raise NameError
URL: https://github.com/apache/airflow/pull/4560#discussion_r249658437
 
 

 ##########
 File path: airflow/hooks/hive_hooks.py
 ##########
 @@ -878,6 +878,7 @@ def to_csv(
         header = next(results_iter)
         message = None
 
+        i = 0
 
 Review comment:
   We could not change L904 due to we don't know if `i` exists or not. set `i = 0` just init `i`.
   If hql statement return no reocrd, L892 will not run and `i = 0`
   else hql statement have record and `i` is reocrd number.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services