@Override
    public void setBuffers(EncodedColumnBatch<OrcBatchKey> batch, boolean sameStripe) throws IOException {
      // The situation here and in other readers is currently as such - setBuffers is never called
      // in SerDe reader case, and SerDe reader case is the only one that uses vector-s.
      // When the readers are created with vectors, streams are actually not created at all.
      // So, if we could have a set of vectors, then set of buffers, we'd be in trouble here;
      // we may need to implement that if this scenario is ever supported.
      assert vectors == null;
      ColumnStreamData[] streamsData = batch.getColumnData(columnId);
      if (_presentStream != null) {
        _presentStream.setBuffers(StreamUtils.createDiskRangeInfo(streamsData[OrcProto.Stream.Kind.PRESENT_VALUE]));
      }
      if (_secondsStream != null) {
        _secondsStream.setBuffers(StreamUtils.createDiskRangeInfo(streamsData[OrcProto.Stream.Kind.DATA_VALUE]));
      }
      if (_nanosStream != null) {
        _nanosStream.setBuffers(StreamUtils.createDiskRangeInfo(streamsData[OrcProto.Stream.Kind.SECONDARY_VALUE]));
      }
    }
We choose to use a toy programming language, so we cannot use multiple inheritance.
If we could, we could have this inherit TreeReader to contain the common impl, and then
have e.g. SettableIntTreeReader inherit both Settable... and Int.. TreeReader-s.
Instead, we have a settable interface that the caller will cast to and call setBuffers.
ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedTreeReaderFactory.java