Currently, unionByName requires two DataFrames to have the same set of columns (even though the order can be different). It would be good to add either an option to unionByName or a new type of union which fills in missing columns with nulls.
This currently throws
Ideally, there would be a way to make this return a DataFrame containing:
Currently the workaround to make this possible is by using unionByName, but this is clunky: