alamb commented on code in PR #9166: URL: https://github.com/apache/arrow-rs/pull/9166#discussion_r2729446538
########## arrow-array/src/nonblocking.rs: ########## @@ -0,0 +1,31 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! Trait definitions specific to using Arrow with async. + +use arrow_schema::{ArrowError, SchemaRef}; + +use crate::record_batch::RecordBatch; + +/// Trait for an asynchronous stream of `RecordBatch`es. +pub trait RecordBatchStream: futures::Stream<Item = Result<RecordBatch, ArrowError>> { Review Comment: This looks good to me The only thing I think may be challenging is that the signature of the RecordBatchStream in DataFusion uses `SchemaRef` rather than `&SchemaRef` https://docs.rs/datafusion/latest/datafusion/execution/trait.RecordBatchStream.html That being said, I think what we can do is to eventually deprecate the RecordBatchStream in DataFusion and use this one instead (and provide an `impl datafusion::RecordBatchStream for arrow_array::RecordBatchStream`) to ease the transition -- 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]
