Quoting @SM_Riga: “… but I am just curious, if there is a Calc based alternative for SQL Union operator’s functionality.”
I was also curious and made a demo similar to what the OQ presented unfortunately only as an image. (Always bad if not the question is specificallly about view issues.)
There was a total 95 rows in three groups of 3 columns each and the solution was designed to allow for a maximum of 1000 rows per group. (Using formulae you always need to specify such maximums.)
The solution based on standard functions was made using 3 helper columns and a few additional helper cells. Its final file size was about 200 KiB.
A solution with a slightly adapted custom function from my toolbox under array-evaluation made a file of 24 KiB.
Of course it may be markedly slower if much more than 3000 rows of output are prepared. The file size would (next to) only grow for the data, not for the output range.
Edit1 regarding the comment below:
In case there is interest I attach this above mentioned demo containing the custom function I used.
(No idea for what reason the file size went up to about 40 Kib. I changed next to nothing.)
To pass and to evaluate an unknown number of parameters (for the same purpose) is a tricky thing and will only be possible at all if an upper limit for that number is assured.
Please note: The demo will not correctly work in AOO.