sunchao commented on code in PR #982:
URL: https://github.com/apache/parquet-mr/pull/982#discussion_r944925723


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java:
##########
@@ -109,7 +110,12 @@ public BytesInput decompress(BytesInput bytes, int 
uncompressedSize) throws IOEx
           decompressor.reset();
         }
         InputStream is = codec.createInputStream(bytes.toInputStream(), 
decompressor);
-        decompressed = BytesInput.from(is, uncompressedSize);
+        if (codec instanceof ZstandardCodec) {

Review Comment:
   The change looks OK to me, we probably should add some comments explaining 
why ZSTD deserves the special treatment here. 
   
   The change on `BytesInput` looks more intrusive since it is used not only 
for decompression but other places like compression. For instance, 
`BytesInput.copy` calls `toByteArray` underneath, and after the call the 
original object should still be valid.



-- 
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]

Reply via email to