edponce commented on pull request #12055:
URL: https://github.com/apache/arrow/pull/12055#issuecomment-1066464298


   There are 2 main solutions for the type of `chunk_resolver_` in 
`ChunkedArray`:
   1. Using a `std::unique_ptr` for lazy initialization (valid approach bc 
`ChunkedArray` is not copyable/assignable). Drawbacks are:
       * the indirect access in the critical path
   3. Using a `ChunkResolver` instance. Drawbacks are:
       * requires defining a default constructor which allows creating empty 
`ChunkResolver` instances which are not that usable
       * requires defining a move assignment
       * requires defining a default copy constructor
       * making `offsets_` non-const bc assignment is necessary for lazy 
evaluation
       * a boolean `ChunkedArray` member variable to track lazy initialization


-- 
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