tustvold opened a new issue, #3154: URL: https://github.com/apache/arrow-rs/issues/3154
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> The various array builders, provide a finish method which consumes the buffers, resetting the builder in the process. When implementing a write path it is common to want to be able to "snapshot" a builder into an immutable Array for query, whilst retaining the builder state to allow for subsequent updates. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> Add a `ArrayBuilder::finish_cloned()` method that instead of consuming the buffers, clones the values. i.e. ``` let mut builder = Int32Builder::new(); builder.append_value(23); builder.append_value(45); assert_eq!(builder.finish_cloned(), Int32Array::from(vec![23, 45])); builder.append_value(56); assert_eq!(builder.finish_cloned(), Int32Array::from(vec![23, 45, 56])); ``` **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> **Additional context** <!-- Add any other context or screenshots about the feature request here. --> -- 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]
