uranusjr commented on code in PR #55110:
URL: https://github.com/apache/airflow/pull/55110#discussion_r2313456236


##########
providers/apache/hive/src/airflow/providers/apache/hive/operators/hive.py:
##########
@@ -143,7 +143,7 @@ def execute(self, context: Context) -> None:
         # set the mapred_job_name if it's not set with dag, task, execution 
time info
         if not self.mapred_job_name:
             ti = context["ti"]
-            logical_date = context["logical_date"]
+            logical_date = context.get("logical_date", None)
             if logical_date is None:
                 raise RuntimeError("logical_date is None")

Review Comment:
   Returning None above would just cause the task to fail at the very next 
line. Not useful. Maybe something like this would work better?
   
   ```python
   logical_date = context.get("logical_date") or context["dag_run"].run_after
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to