zeroshade commented on code in PR #40807:
URL: https://github.com/apache/arrow/pull/40807#discussion_r1553869528
##########
cpp/src/arrow/c/bridge.cc:
##########
@@ -2067,14 +2092,20 @@ class ExportedArrayStream {
ARROW_DISALLOW_COPY_AND_ASSIGN(PrivateData);
};
- explicit ExportedArrayStream(struct ArrowArrayStream* stream) :
stream_(stream) {}
+ explicit ExportedArrayStream(StreamType* stream) : stream_(stream) {}
Status GetSchema(struct ArrowSchema* out_schema) {
return ExportStreamSchema(reader(), out_schema);
}
- Status GetNext(struct ArrowArray* out_array) {
- return ExportStreamNext(reader(), next_batch_num(), out_array);
+ Status GetNext(ArrayType* out_array) {
+ if constexpr (std::is_same_v<ArrayType, struct ArrowArray>) {
+ return ExportStreamNext(reader(), next_batch_num(), out_array);
+ } else if constexpr (std::is_same_v<T, ChunkedArray>) {
+ return ExportDeviceStreamNext(reader(), next_batch_num(), nullptr,
out_array);
Review Comment:
Right now it's a placeholder so I don't need to change the API when we
decide how we want to handle sync events with chunked arrays in the future. If
you think it'd be better to just leave it out of the signature for now and
leave a comment for the future instead (since this isn't part of the public
interface anyways) then I can do that.
--
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]