Example use cases
One significant proposed benefit of having the C Data API was to allow applications to implement the API without requiring a dependency on the Arrow libraries. Let's suppose there is an existing computational engine written in C++ that wants to add the ability to return data in the Arrow format without adding a new dependency or having to link with the Arrow libraries. There are many possible reasons why you might want to avoid adding a new dependency to a project. This could range from the development environment to the complexity of deployment mechanisms, but we're not going to focus on that side of it.
Using the C Data API to export Arrow-formatted data
Do you have your development environment all set up for C++? If not, go and do that and come back. You know the drill; I'll wait.
We'll start with a small function to generate a vector of random 32-bit integers, which will act as our sample data. You know how to do that? Well, good....