Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using multiMap to output null does not reproduce the behavior of using map to output null #5586

Open
maxulysse opened this issue Dec 9, 2024 · 2 comments

Comments

@maxulysse
Copy link
Contributor

Bug report

I feel like when I try to output null from a multiMap it's treated as null, and not as an empty channel as it is when I output null from a map.

Expected behavior and actual behavior

I would expect any channel being null to be an empty channel however it was created

Steps to reproduce the problem

https://github.com/maxulysse/nf-multimap-mre

Environment

  • Nextflow version: 24.10.2
  • Java version:
openjdk version "21.0.5" 2024-10-15
OpenJDK Runtime Environment (build 21.0.5+11-Ubuntu-1ubuntu122.04)
OpenJDK 64-Bit Server VM (build 21.0.5+11-Ubuntu-1ubuntu122.04, mixed mode, sharing)
  • Operating system: Linux Mint
  • Bash version: zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

Additional context

(Add any other context about the problem here)

@bentsherman
Copy link
Member

whoa, I had no idea that map filters out null values:

if (result != Channel.VOID)
proc.bindOutput(result)

static public NullObject VOID = NullObject.getNullObject()

In my opinion, multiMap does the right thing and map should not do this, but it's useful to know that it does. Changing either one could break so many things that I don't think we can do anything but document the current behavior

@maxulysse
Copy link
Contributor Author

whoa, I had no idea that map filters out null values:

Happy to help discovering behavior

In my opinion, multiMap does the right thing and map should not do this, but it's useful to know that it does. Changing either one could break so many things that I don't think we can do anything but document the current behavior

ok, for me the same behavior should happen in both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants