In my opinion, this restriction would be better to checked in LogicalPlanVerifier. What do you think about it?
In addition, the exception message should be fixed with "Children of union node should have the same number of targets.", because Union node can't have any targets.