[ 
https://issues.apache.org/jira/browse/ARROW-7338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014500#comment-17014500
 ] 

Ben Kietzman edited comment on ARROW-7338 at 2/18/20 2:06 PM:
--------------------------------------------------------------

I think it's not necessary to have double indirection; why not let {{Generator 
= RecordBatchIterator}}?

EDIT: nevermind; then the batches would be consumed by the first scan


was (Author: bkietz):
I think it's not necessary to have double indirection; why not let {{Generator 
= RecordBatchIterator}}?

> [C++] Improve InMemoryDataSource to support generator instead of static list
> ----------------------------------------------------------------------------
>
>                 Key: ARROW-7338
>                 URL: https://issues.apache.org/jira/browse/ARROW-7338
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++ - Dataset
>            Reporter: Francois Saint-Jacques
>            Assignee: Francois Saint-Jacques
>            Priority: Major
>
> The constructor should take a generator
> {code:c++}
> // Some comments here
> class InMemoryDataSource : public DataSource {
>   public:
>     using Generator = std::function<Iterator<std::shared_ptr<RecordBatch>()>;
>     InMemoryDataSource(Generator&& generator);
>     // Convenience constructor to support a fixed list of RecordBatch
>     InMemoryDataSource(std::shared_ptr<RecordBatch>);
>     InMemoryDataSource(std::vector<std::shared_ptr<RecordBatch>>);
> private:
>   Generator generator;
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to