I'm using IJIEnumVariant to process a large data set, and I've found that by increasing the batch size (i.e. the celt parameter to next( )) I can get substantial performance gains.
If the last batch in the underlying result set is, say, 6 elements whereas my batch size is 10, then API is documented to return S_FALSE, to indicate the full celt elements were not available. The actual number of elements returned is passed back in the second out parameter.
Unfortunately, jinterop assumes that any nonzero return value represents a failure, and throws an unwarranted exception. The output parameters of the call do not seem to be available anywhere in this case.
At this point I have no way to obtain the last page of data - I can't fall back to calling next(1) since on the server side the final page has already been walked. And it does not appear to work to "rewind" by calling skip(-10) or anything like that.
Is there any workaround for this, so that the next method of IJIEnumVariant can work as designed?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using
IJIEnumVariant
to process a large data set, and I've found that by increasing the batch size (i.e. thecelt
parameter tonext( )
) I can get substantial performance gains.If the last batch in the underlying result set is, say, 6 elements whereas my batch size is 10, then API is documented to return
S_FALSE
, to indicate the fullcelt
elements were not available. The actual number of elements returned is passed back in the secondout
parameter.Unfortunately, jinterop assumes that any nonzero return value represents a failure, and throws an unwarranted exception. The output parameters of the call do not seem to be available anywhere in this case.
At this point I have no way to obtain the last page of data - I can't fall back to calling
next(1)
since on the server side the final page has already been walked. And it does not appear to work to "rewind" by callingskip(-10)
or anything like that.Is there any workaround for this, so that the
next
method ofIJIEnumVariant
can work as designed?