EmilyMatt opened a new issue, #1516:
URL: https://github.com/apache/datafusion-comet/issues/1516
### What is the problem the feature request solves?
Currently the file has a manual implementation:
`pub struct EmptyStream {
/// Schema representing the data
schema: SchemaRef,
}
impl EmptyStream {
/// Create an iterator for a vector of record batches
pub fn try_new(schema: SchemaRef) -> Result<Self> {
Ok(Self { schema })
}
}
impl Stream for EmptyStream {
type Item = Result<RecordBatch>;
fn poll_next(self: std::pin::Pin<&mut Self>, _: &mut Context<'_>) ->
Poll<Option<Self::Item>> {
Poll::Ready(None)
}
}
impl RecordBatchStream for EmptyStream {
/// Get the schema
fn schema(&self) -> SchemaRef {
Arc::clone(&self.schema)
}
}`
However, datafusion already provides this same functionality via
datafusion::physical_plan::EmptyRecordBatchStream.
So I don't see much point in keeping this, this file is complex enough
### Describe the potential solution
Simply removing the current work, and creating a new EmptyRecordBatchStream
in execute
### Additional context
_No response_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]