You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "YoungRX (via GitHub)" <gi...@apache.org> on 2023/03/09 05:11:45 UTC

[GitHub] [arrow] YoungRX commented on issue #34494: [C++] How to handle the limit clause when scanning Parquet files using Scanner?

YoungRX commented on issue #34494:
URL: https://github.com/apache/arrow/issues/34494#issuecomment-1461289041

   Thanks for your help. 
   
   I'm using 8.0.0. And I found the following code in `AsyncScanner::ScanBatchesUnorderedAsync`:
   ```
     // If the generator is destroyed before being completely drained, inform plan
     std::shared_ptr<void> stop_producing{
         nullptr, [plan, exec_context](...) {
           bool not_finished_yet = plan->finished().TryAddCallback(
               [&plan, &exec_context] { return [plan, exec_context](const Status&) {}; });
   
           if (not_finished_yet) {
             plan->StopProducing();
           }
         }};
   ```
   Now I have shared pointers like scanner and recordBatchReader. The possible cause is that the value of `use_count()` of the shared pointer is greater than 1. The memory cannot be released through `reset()`.
   
   How do I completely destroy the generator mentioned in the above code to call `stop_producing`?
   


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org