Desdroid commented on issue #48005: URL: https://github.com/apache/airflow/issues/48005#issuecomment-4855378613
> > > > Closing as resolved - the literal example in this issue works properly as the `.expand(...)` now covers it. However, [#69036](https://github.com/apache/airflow/issues/69036) is indeed a new issue caused by migration to the task sdk, which has a similar root cause. Created a PR to solve it [#69075](https://github.com/apache/airflow/pull/69075). > > > > > > > > > [@shahar1](https://github.com/shahar1) Are you sure that this issue here is resolved? I can reproduce it with an 3.2.2 installation, copy pasting the example dag above. > > > `display_results` prints `None` instead of an empty list for me. > > > Thanks for looking into it and the PR 🫶 > > > > > > Please let me double check on it, reopening. > > [@Desdroid](https://github.com/Desdroid) When running on main, I got the following output: > > ``` > [2026-06-30T07:40:47.208203Z] INFO - LazyXComSequence(<unevaluated length>) > [2026-06-30T07:40:47.208477Z] INFO - Done. Returned value was: None > ``` > > `display_results` returns `None` because it just logs (`logger.info(results)`) and doesn't actually return anything. > > Reclosing :) Well, **I** should've double checked before posting. Somehow got confused which log line was which. Indeed LazyXComSequence is received which is the desired behavior from my point of view. I'm sincerely sorry for the confusion. > [@shahar1](https://github.com/shahar1) But the desired behavior (at least in my eyes) is that it returns `[]` and not `None`. I am against this. Why should a method that does not have a return statement suddenly return an empty list? This is different from how (normal) python works and I'd consider it unpythonic. The original title of this issue is `Result of expanded task is None instead of empty list when all mapped tasks return None` and also from the previous comments and description i understood that it was about the `display_results()` receiving `None` as a result of the expanded tasks while it now receives `LazyXComSequence` -> empty list, which is correct imo. Therefore I'd vote to close this. -- 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]
