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:
   @feng-tao 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:
[email protected]


With regards,
Apache Git Services

Reply via email to