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

    https://github.com/apache/trafodion/pull/1557#discussion_r187179351
  
    --- Diff: core/sql/src/main/java/org/trafodion/sql/HDFSClient.java ---
    @@ -151,10 +180,38 @@ public Object call() throws IOException
                 bufOffset_ += bytesRead;
                 pos_ += bytesRead;
                 lenRemain_ -= bytesRead;
    -         } while (lenRemain_ > 0);
    +         } while (lenRemain_ > 0); 
              return new Integer(totalBytesRead);
           }
    -   }
    +    } 
    +
    +    int compressedFileRead(int readLenRemain) throws IOException 
    +    {
    +       int totalReadLen = 0;
    +       int readLen;
    +       int offset = 0;
    +       int retcode;
    +
    +         int lenRemain = ((readLenRemain > bufArray_.length) ? 
bufArray_.length : readLenRemain);
    --- End diff --
    
    What happens if readLenRemain is zero or negative on entry?


---

Reply via email to