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_r249659195
 
 

 ##########
 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 Of course we can write some code like
   ```python
   self.log.info("Done. Loaded a total of %s rows.", i if 'i' in locals() else 
0)
   ```
   but I think is a little strange, so I put `i = 0` in L881

----------------------------------------------------------------
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