Let's take a simple example. No network connection is involved. Say I can have an array table of digital products, which has one column of shared_ptr pointing to a product object allocated on heap. I would like to do filtering on the column "brand" using the value "Samsung". Therefore I can get all rows of "Samsung" products and by accessing the column of shared pointer , I can access details of this product. Without using a shared pointer, I would have to copy the product details into multiple columns of this table. If I save all these shared pointers in a separate vector, then I cannot do filtering like that in the arrow table.
The challenge for me is how to store a shared_ptr in a "cell" of an arrow table. It seems to me only the primitive types are supported, but I would like to confirm. I think the "extension" type might help with my scenario but I'm not sure how to make it work. If it's a simple type like integer, I can do IntBuilder to build an array and make a record batch out of it. Hope this provides a bit of clarity. Thank you. On Wed, 9 Oct 2024 at 19:12, Andrew Bell <andrew.bell...@gmail.com> wrote: > > On Wed, Oct 9, 2024, 12:27 PM Yi Cao <cao.yi.s...@gmail.com> wrote: > >> If I place these shared ptrs in a vector, how can I make this vector >> saved in Arrow table as a column? Is it possible? >> > > What do you mean by "saved"? > > I don't understand the point of placing shared pointers in an arrow array. > It's essentially equivalent to storing the pointers in a vector. You can't > write shared pointers to a data store or send them across a network > connection. >