fix: impl RecordBatchStream method explicitly (#3482)

fix: impl RecordBatchStream method explicitly
This commit is contained in:
shuiyisong
2024-03-11 17:07:10 +08:00
committed by GitHub
parent aa125a50f9
commit aa953dcc34
9 changed files with 104 additions and 14 deletions

View File

@@ -15,7 +15,8 @@
use std::pin::Pin;
use std::task::{Context, Poll};
use common_recordbatch::{RecordBatch, RecordBatchStream, SendableRecordBatchStream};
use common_recordbatch::adapter::RecordBatchMetrics;
use common_recordbatch::{OrderOption, RecordBatch, RecordBatchStream, SendableRecordBatchStream};
use datatypes::schema::SchemaRef;
use futures::Stream;
use futures_util::ready;
@@ -78,6 +79,14 @@ impl<F: FnOnce() + Unpin> RecordBatchStream for OnDone<F> {
fn schema(&self) -> SchemaRef {
self.stream.schema()
}
fn output_ordering(&self) -> Option<&[OrderOption]> {
self.stream.output_ordering()
}
fn metrics(&self) -> Option<RecordBatchMetrics> {
self.stream.metrics()
}
}
impl<F: FnOnce() + Unpin> Stream for OnDone<F> {