Re: C interface clarifications

2020-04-07 Thread Wes McKinney
I opened a JIRA to track a potential change or at least clarification about this use case. One major use case for the C interface will be in database clients (e.g. this question arose out of using the C interface for Kudu -- a database) and this may be a common question. https://issues.apache.org/

Re: C interface clarifications

2020-04-07 Thread Antoine Pitrou
Le 07/04/2020 à 19:39, Wes McKinney a écrit : > > Re-orienting the discussion on something more concrete, suppose that an > ArrowArray is used to convey a result set from a database query, and > suppose that the resources associated with each column in the result set > are independent of the oth

Re: C interface clarifications

2020-04-07 Thread Wes McKinney
On Tue, Apr 7, 2020, 12:04 PM Antoine Pitrou wrote: > > Le 07/04/2020 à 18:49, Todd Lipcon a écrit : > >> > >> Hmm, the spec may not be clear enough on this, but if you move a child > >> and release the parent, then the other children are not usable anymore. > >> > >> In your case, you don't call

Re: C interface clarifications

2020-04-07 Thread Antoine Pitrou
Le 07/04/2020 à 18:49, Todd Lipcon a écrit : >> >> Hmm, the spec may not be clear enough on this, but if you move a child >> and release the parent, then the other children are not usable anymore. >> >> In your case, you don't call release() on every child. You just call >> release() on the pare

Re: C interface clarifications

2020-04-07 Thread Todd Lipcon
On Tue, Apr 7, 2020 at 2:40 AM Antoine Pitrou wrote: > > Le 06/04/2020 à 19:22, Todd Lipcon a écrit : > > > > The spec should also probably cover thread-safety: if the consumer gets > an > > ArrowArray, is it safe to pass off the children to multiple threads and > > have them call release() concu

Re: C interface clarifications

2020-04-07 Thread Antoine Pitrou
Le 06/04/2020 à 19:22, Todd Lipcon a écrit : > > The spec should also probably cover thread-safety: if the consumer gets an > ArrowArray, is it safe to pass off the children to multiple threads and > have them call release() concurrently? In other words, do I need to use a > thread-safe referenc

Re: C interface clarifications

2020-04-06 Thread Wes McKinney
On Mon, Apr 6, 2020 at 12:22 PM Todd Lipcon wrote: > > On Mon, Apr 6, 2020 at 9:57 AM Antoine Pitrou wrote: > > > > > Hello Todd, > > > > Le 06/04/2020 à 18:18, Todd Lipcon a écrit : > > > > > > I had a couple questions / items that should be clarified in the spec. > > Wes > > > suggested I raise

Re: C interface clarifications

2020-04-06 Thread Todd Lipcon
On Mon, Apr 6, 2020 at 9:57 AM Antoine Pitrou wrote: > > Hello Todd, > > Le 06/04/2020 à 18:18, Todd Lipcon a écrit : > > > > I had a couple questions / items that should be clarified in the spec. > Wes > > suggested I raise them here on dev@: > > > > *1) Should producers expect callers to zero-i

Re: C interface clarifications

2020-04-06 Thread Antoine Pitrou
Hello Todd, Le 06/04/2020 à 18:18, Todd Lipcon a écrit : > > I had a couple questions / items that should be clarified in the spec. Wes > suggested I raise them here on dev@: > > *1) Should producers expect callers to zero-init structs?* IMO, they shouldn't. They should fill the structure ex