zeroshade commented on code in PR #40807:
URL: https://github.com/apache/arrow/pull/40807#discussion_r1551825314
##########
cpp/src/arrow/record_batch.h:
##########
@@ -300,6 +311,11 @@ class ARROW_EXPORT RecordBatchReader {
/// \brief finalize reader
virtual Status Close() { return Status::OK(); }
+ /// \brief Get the device type for record batches this reader produces
+ ///
+ /// default implementation is to return ARROW_DEVICE_CPU
+ virtual DeviceAllocationType device_type() const { return
DeviceAllocationType::kCPU; }
Review Comment:
As of yet, I haven't implemented figuring out what type to send here. Since
we aren't storing the device type at the record batch level, this would need to
spin through the buffers of its columns which could *potentially* be from
multiple devices if a user did something weird. So I'm not sure what the best
solution here is. I'd rather not add a `RecordBatch` level device_type member,
but I don't yet know how to best handle the situation if a consumer does
something bad
--
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]