orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sershe <...@git.apache.org>
Subject [GitHub] orc pull request #222: ORC-310 better error handling for codec
Date Mon, 12 Mar 2018 20:56:06 GMT
Github user sershe commented on a diff in the pull request:

    https://github.com/apache/orc/pull/222#discussion_r173943752
  
    --- Diff: java/core/src/java/org/apache/orc/impl/RecordReaderUtils.java ---
    @@ -306,15 +330,24 @@ public void releaseBuffer(ByteBuffer buffer) {
     
         @Override
         public DataReader clone() {
    +      if (this.file != null) {
    +        throw new UnsupportedOperationException(
    +            "Cannot clone a DataReader that is already opened");
    +      }
           try {
    -        return (DataReader) super.clone();
    +        DefaultDataReader clone = (DefaultDataReader) super.clone();
    +        // Make sure we don't share the same codec between two readers.
    +        clone.codec = OrcCodecPool.getCodec(clone.compressionKind);
    --- End diff --
    
    super.clone() is Object.clone(), so no 


---

Mime
View raw message