felipecrv commented on issue #34535:
URL: https://github.com/apache/arrow/issues/34535#issuecomment-1927733262

   @SChakravorti21 I had an idea since my changes to the class interface that 
you could add maybe?
   
   I added
    
   ```cpp
     inline ChunkLocation ResolveWithChunkIndexHint(int64_t index,
                                                    int64_t cached_chunk_index) 
const {
   ```
   
   I was planning to add a `ResolveWithHint(int64_t index, ChunkLocation hint)` 
-- simpler name and less error-prone. Its definition is:
   
   ```cpp
   
     inline ChunkLocation ResolveWithHint(int64_t index, ChunkLocation hint) 
const {
       assert(hint.chunk_index < static_cast<int64_t>(offsets_.size()));
       const auto chunk_index =
           ResolveChunkIndex</*StoreCachedChunk=*/false>(index, 
hint.chunk_index);
       return {chunk_index, index - offsets_[chunk_index]};
     }
   ```


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