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


##########
airflow/datasets/__init__.py:
##########
@@ -233,7 +265,15 @@ class _DatasetBooleanCondition(BaseDataset):
     def __init__(self, *objects: BaseDataset) -> None:
         if not all(isinstance(o, BaseDataset) for o in objects):
             raise TypeError("expect dataset expressions in condition")
-        self.objects = objects
+
+        expanded_objects = []
+        for obj in objects:
+            if isinstance(obj, Dataset):
+                expanded_objects.append(obj)
+            elif isinstance(obj, DatasetAlias):
+                expanded_objects.extend(obj.expand_datasets())

Review Comment:
   but under the hook `iter_datatset` actually calls `expand_datasets`
   
   in `iter_datatset`, we try to make `datasets` to `name, dataset` and then 
use `[ds for _, ds in obj.iter_datatset()]` to make it `datasets` again. looks 
like an extra step for me



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