In Apache Arrow, for example, I have a data which looks like:
struct TabularData {
int A;
int B;
int C;
}
One way is to set three corresponding columns and store the data in A column, B column and C column. Another way is to set just a column and set this struct TabularData as a whole data into this column.
Since Arrow is zero-copy in memory, we don't need any memory copy when we need to read data of A column no matter whether it's in a single column or in a nested message.
My question is: What's the advantage of having multiple columns than just setting all data into one column?