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

Liya Fan commented on ARROW-5508:
---------------------------------

I still have not figured out how to check the end of the iterator by the Next 
method:
 # If it is through the return value, this could be inefficient - Status is a 
class, and there can be object copy when returning an Status object.
 # If it is through the method parameter, I think the parameter type should be 
T*& or T** ?

 

> [C++] Create reusable Iterator<T> interface 
> --------------------------------------------
>
>                 Key: ARROW-5508
>                 URL: https://issues.apache.org/jira/browse/ARROW-5508
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Wes McKinney
>            Priority: Major
>
> We have various iterator-like classes. I envision a reusable interface like
> {code}
> template <typename T>
> class Iterator {
>  public:
>   virtual ~Iterator() = default;
>   virtual Status Next(T* out) = 0;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to