amoeba opened a new issue, #48698:
URL: https://github.com/apache/arrow/issues/48698

   ### Describe the enhancement requested
   
   This was asked about in https://github.com/apache/arrow-adbc/issues/3827 and 
I thought filing an issue here would be good.
   
   Should it be explicitly stated that a stream is in either an undefined or 
invalid state after `get_next` returns an error?
   
   Reading the docstrings and docs, I think it could be more clear. The 
question in the linked issue was whether it's considered valid to essentially 
smuggle a non-fatal error into a stream and continue processing. I'm not sure 
if this was an intended use case.
   
   We could update the docs and docstrings to say one or two related things:
   
   1. `get_next()` MUST not be called if calling it previously on the current 
stream returned a non-zero value (an error).
   2. After calling `get_next()` on an ArrowArrayStream returns a non-zero 
value, the only value valid callbacks which may be called are 
`get_last_error()` and `release()`.
   
   Do others think the clarification is useful? If so, I could file a PR here 
to get the language right and then propagate the change to other repos where we 
the ArrowArrayStream definition is duplicated/vendored.
   
   ### Component(s)
   
   Format


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to