I have a set of items that I want to process conditionally, and tried using a switch-and-merge pattern (using the Append mode) to do this. When the switch node outputs at least one item of each branch, the merge node behaves as expected. But when the Switch node outputs no items of some branch, the nodes in the unvisited branch still run.
Yes, that is currently expected behavior. The Merge-Node needs always both inputs to execute to move forward and executes the second by itself, if it did not before. There was recently another discussion about it here:
Additionally also here a feature request regarding this behavior:
Thank you for the clarification, @jan! Based on this, I switched approaches from Switch-and-Merge to iterating over items using SplitInBatches, and was able to solve my problem.