You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/02/26 11:18:26 UTC

[GitHub] [arrow-datafusion] jackwener commented on a diff in pull request #5397: Zstd compression

jackwener commented on code in PR #5397:
URL: https://github.com/apache/arrow-datafusion/pull/5397#discussion_r1118066236


##########
datafusion/core/src/datasource/file_format/file_type.rs:
##########
@@ -162,8 +173,13 @@ impl FileCompressionType {
             BZIP2 => Box::new(BzDecoder::new(r)),
             #[cfg(feature = "compression")]
             XZ => Box::new(XzDecoder::new(r)),
+            #[cfg(feature = "compression")]
+            ZSTD => match ZstdDecoder::new(r) {
+                Ok(decoder) => Box::new(decoder),
+                Err(e) => return Err(DataFusionError::External(Box::new(e))),

Review Comment:
   I'm a little confused about why we use `DataFusionError::External` warp the error instead of return directly.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org