Lee-W commented on code in PR #40809:
URL: https://github.com/apache/airflow/pull/40809#discussion_r1687481887


##########
airflow/utils/context.py:
##########
@@ -245,28 +250,47 @@ class InletEventsAccessors(Mapping[str, 
LazyDatasetEventSelectSequence]):
 
     _inlets: list[Any]
     _datasets: dict[str, Dataset]
+    _dataset_aliases: dict[str, DatasetAlias]
     _session: Session
 
     def __init__(self, inlets: list, *, session: Session) -> None:
         self._inlets = inlets
-        self._datasets = {inlet.uri: inlet for inlet in inlets if 
isinstance(inlet, Dataset)}
         self._session = session
+        self._datasets = {}
+        self._dataset_aliases = {}
+
+        for inlet in inlets:
+            if isinstance(inlet, Dataset):
+                self._datasets[inlet.uri] = inlet
+            elif isinstance(inlet, DatasetAlias):
+                self._dataset_aliases[inlet.name] = inlet

Review Comment:
   Yep, that's a great idea, and I agree that it would be a refactoring in 
another PR.



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