uranusjr commented on code in PR #40693:
URL: https://github.com/apache/airflow/pull/40693#discussion_r1677481865
##########
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:
The plus side is you can use it for Dataset as well. Also this gets me
wonder what happens if this gets fed one of the boolean conditionals? Like if
you do `a | (b & c)` the DatasetAny needs to handle a nested DatasetAll here.
--
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]