Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15632#discussion_r85047248
  
    --- Diff: core/src/main/java/org/apache/spark/io/LZ4BlockInputStream.java 
---
    @@ -197,7 +197,7 @@ private void refill() throws IOException {
             readFully(buffer, originalLen);
             break;
           case COMPRESSION_METHOD_LZ4:
    -        if (compressedBuffer.length < originalLen) {
    +        if (compressedBuffer.length < compressedLen) {
    --- End diff --
    
    Does this possibly happen?
    
    I go to check 
https://github.com/jpountz/lz4-java/blob/master/src/java/net/jpountz/lz4/LZ4BlockOutputStream.java#L192
    
    If the compressed lengh is more the original length, it will choose 
`COMPRESSION_METHOD_RAW` as compress method, instead of 
`COMPRESSION_METHOD_LZ4`. In other words, the compressed length is never more 
then original length under `COMPRESSION_METHOD_LZ4`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to