mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 00:26:53 +00:00
feat(s3select): improve SelectObjectContent streaming (#3072)
* feat(s3select): improve SelectObjectContent streaming * fix(s3select): reject empty select expressions * fix(s3select): address streaming review feedback --------- Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
@@ -117,6 +117,15 @@ impl Output {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn into_record_batch_stream(self) -> QueryResult<SendableRecordBatchStream> {
|
||||
match self {
|
||||
Self::StreamData(stream) => Ok(stream),
|
||||
Self::Nil(_) => Err(QueryError::NotImplemented {
|
||||
err: "empty select output stream".to_string(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn num_rows(self) -> usize {
|
||||
match self.chunk_result().await {
|
||||
Ok(rb) => rb.iter().map(|e| e.num_rows()).sum(),
|
||||
|
||||
Reference in New Issue
Block a user