This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new d3280d724 Update for multistream (#5629)
d3280d724 is described below
commit d3280d72438556b596c5c7653056d7c9ee6848e1
Author: Metehan Yıldırım <[email protected]>
AuthorDate: Sat Mar 18 15:03:21 2023 +0300
Update for multistream (#5629)
---
datafusion/core/src/datasource/file_format/file_type.rs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/datafusion/core/src/datasource/file_format/file_type.rs
b/datafusion/core/src/datasource/file_format/file_type.rs
index 59c95962a..e07eb8a3d 100644
--- a/datafusion/core/src/datasource/file_format/file_type.rs
+++ b/datafusion/core/src/datasource/file_format/file_type.rs
@@ -30,10 +30,10 @@ use async_compression::tokio::bufread::{
};
use bytes::Bytes;
#[cfg(feature = "compression")]
-use bzip2::read::BzDecoder;
+use bzip2::read::MultiBzDecoder;
use datafusion_common::parsers::CompressionTypeVariant;
#[cfg(feature = "compression")]
-use flate2::read::GzDecoder;
+use flate2::read::MultiGzDecoder;
use futures::Stream;
#[cfg(feature = "compression")]
use futures::TryStreamExt;
@@ -168,11 +168,11 @@ impl FileCompressionType {
) -> Result<Box<dyn std::io::Read + Send>> {
Ok(match self.variant {
#[cfg(feature = "compression")]
- GZIP => Box::new(GzDecoder::new(r)),
+ GZIP => Box::new(MultiGzDecoder::new(r)),
#[cfg(feature = "compression")]
- BZIP2 => Box::new(BzDecoder::new(r)),
+ BZIP2 => Box::new(MultiBzDecoder::new(r)),
#[cfg(feature = "compression")]
- XZ => Box::new(XzDecoder::new(r)),
+ XZ => Box::new(XzDecoder::new_multi_decoder(r)),
#[cfg(feature = "compression")]
ZSTD => match ZstdDecoder::new(r) {
Ok(decoder) => Box::new(decoder),