Gabriel, would it be ok with your use case if instead of calling getIterator() a second time, you reused the same iterator? Basically, the code would look something like this:
// iter = args[0] ->getIterator( );
iter->open();
iter->next(item);
iter->close();
The only difference between the above code and your example is that I have commented-out the 2nd call to getIterator().
In general, it doesn't make sense to have more than one iterator on a ExtFuncArgItemSequence, unless the sequence is materialized, and then you would get a performance hit.
Gabriel, would it be ok with your use case if instead of calling getIterator() a second time, you reused the same iterator? Basically, the code would look something like this:
Item item;
Iterator_t iter = args[0] ->getIterator( );
iter->open();
iter->next(item);
iter->close();
// iter = args[0] ->getIterator( );
iter->open();
iter->next(item);
iter->close();
The only difference between the above code and your example is that I have commented-out the 2nd call to getIterator().
In general, it doesn't make sense to have more than one iterator on a ExtFuncArgItemS equence, unless the sequence is materialized, and then you would get a performance hit.