clarkzinzow commented on issue #26685:
URL: https://github.com/apache/arrow/issues/26685#issuecomment-1766630575

   > @clarkzinzow can you explain a bit your rationale of going with this 
payload class?
   
   @jorisvandenbossche @pitrou IIRC I started with `ArrayData` as the payload 
aggregation class, but ended up wanting a parent pointer to make the 
visitor-based aggregation clean, so we could hop back to the parent payload at 
`Seal()` time. I thought that the payload class would end up deviating in other 
ways, but it ended up being very close to `ArrayData`, so I **do** think that 
we should find a way to make `ArrayData` work.
   
   One option would be maintaining an explicit shared-pointer stack of 
in-progress `ArrayData`s in the aggregator, which would obviate the need for 
the parent pointer:
   - on `WithArray`, we create a new `ArrayData`, link it as the child of the 
`current_`, push the new one onto the stack and set it to be `current_`,
   - on `Seal()`, we pop the `current_` `ArrayData` off the stack, and set 
`current_` to be the new top of the stack (the parent).
   
   With that change, I believe that `ArrayData` would suffice as the buffer 
aggregation payload.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to