scovich commented on PR #8241: URL: https://github.com/apache/arrow-rs/pull/8241#issuecomment-3275609443
Looking at both this PR and the next one https://github.com/apache/arrow-rs/pull/8282, I think we can actually cover all five list types with just one list builder if we create a new extension trait: ```rust trait ListLikeArray: Array { /// Get the values array fn values(&self) -> &arrow::array::ArrayRef; /// Get the start and end indices for a list element fn element_range(&self, index: usize) -> Range<usize>; } ``` And then the builder takes a template type `L: ListLikeArray` or similar? (Probably something similar could be done for the binary and string array variations as well, but I didn't look as closely there) -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org