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


##########
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:
   @uranusjr No idea to be honest
   
   the original behavior is `raise RuntimeError("logical_date is None")`
   
   but that Error won't fire for asset trigger runs. instead, it just error out 
at 
   `context["logical_date"]`
   
   Though I'm good that hive partition is compatible with `asset`. (e.g., we 
can have daily schedule asset as the schedule of a dag with HiveOperators).
   
   I'm just keeping the orignal behavior that
   
   > HiveOperator only works in dag with `logical_date`



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to