@Override
    public byte[] read(Decoder decoder, Object reuse) throws IOException {
      // use the decoder's readBytes method because it may be a resolving decoder
      // the only time the previous value could be reused is when its length matches the next array,
      // but there is no way to know this with the readBytes call, which uses a ByteBuffer. it is
      // possible to wrap the reused array in a ByteBuffer, but this may still result in allocating
      // a new buffer. since the usual case requires an allocation anyway to get the size right,
      // just allocate every time.
      return decoder.readBytes(null).array();
      //      int length = decoder.readInt();
      //      byte[] bytes = new byte[length];
      //      decoder.readFixed(bytes, 0, length);
      //      return bytes;
    }
Builds a read plan for record classes that use planned reads instead of a ResolvingDecoder.

@param expected expected StructType
@param record Avro record schema
@param fieldReaders list of readers for each field in the Avro record schema
@param idToConstant a map of field ID to constants values
@param convert function to convert from internal classes to the target object model
@return a read plan that is a list of (position, reader) pairs
iceberg/patched-iceberg-core/src/main/java/org/apache/iceberg/avro/ValueReaders.java