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 


---

Reply via email to