nathadfield commented on code in PR #67285:
URL: https://github.com/apache/airflow/pull/67285#discussion_r3373690941


##########
airflow-core/docs/migrations-ref.rst:
##########
@@ -39,7 +39,10 @@ Here's the list of all the Database Migrations that are 
executed via when you ru
 
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
 | Revision ID             | Revises ID       | Airflow Version   | Description 
                                                 |
 
+=========================+==================+===================+==============================================================+
-| ``9ff64e1c35d3`` (head) | ``dd5f3a8e2b91`` | ``3.3.0``         | Add indexes 
on dag_run.created_dag_version_id and            |
+| ``d2f4e1b3c5a7`` (head) | ``9ff64e1c35d3`` | ``3.3.0``         | Add 
partition_date to asset_event and                        |

Review Comment:
   `AssetEvent.partition_date` carries the *source-side* datetime so the 
consumer can resolve its own `partition_date` without a second lookup. It's 
consumed in `_compute_target_partition_date`: for `IdentityMapper` the 
downstream date is the upstream date, read straight off the event. Keeping it 
on the event (rather than re-deriving from 
`event.source_dag_id`/`source_run_id`) means the value survives source-DagRun 
pruning and avoids an extra query per APDR at scheduler-tick time. The 
`StartOf*Mapper` family re-derives from the key instead, and rollup/other 
mappers leave it `None`. Happy to drop the column and re-derive via the source 
DagRun if you'd prefer less denormalization as it's a small change.



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