class PGFloatVectorType extends PGType<float[]> {


    public static final PGFloatVectorType INSTANCE = new PGFloatVectorType();

    PGFloatVectorType() {
        super(PGArray.FLOAT4_ARRAY.oid(), -1, -1, PGArray.FLOAT4_ARRAY.typName());
    }

    @Override
    public int typArray() {
        return 0;
    }

    @Override
    public int typElem() {
        return PGArray.FLOAT4_ARRAY.typElem();
    }

    @Override
    public String typeCategory() {
        return PGArray.FLOAT4_ARRAY.typeCategory();
    }

    @Override
    public String type() {
        return PGArray.FLOAT4_ARRAY.type();
    }

    @Override
    public int writeAsBinary(ByteBuf buffer, @NotNull float[] value) {<FILL_FUNCTION_BODY>}

    @Override
    public float[] readBinaryValue(ByteBuf buffer, int valueLength) {
        int dimensions = buffer.readInt();
        assert dimensions == 1 : "float_vector should have only 1 dimension";
        buffer.readInt(); // flags bit 0: 0=no-nulls, 1=has-nulls
        buffer.readInt(); // element oid
        int dimension = buffer.readInt();
        buffer.readInt();  // lowerBound ignored
        return readArrayAsBinary(buffer, dimension);
    }

    @Override
    byte[] encodeAsUTF8Text(float[] value) {
        ByteArrayList encodedValues = new ByteArrayList();
        encodedValues.add((byte) '{');
        for (int i = 0; i < value.length; i++) {
            var f = value[i];
            if (i > 0) {
                encodedValues.add((byte) ',');
            }
            byte[] bytes = RealType.INSTANCE.encodeAsUTF8Text(f);
            encodedValues.add((byte) '"');
            encodedValues.add(bytes);
            encodedValues.add((byte) '"');
        }
        encodedValues.add((byte) '}');
        return Arrays.copyOfRange(encodedValues.buffer, 0, encodedValues.elementsCount);
    }

    @SuppressWarnings("unchecked")
    @Override
    float[] decodeUTF8Text(byte[] bytes) {
        var list = (List<Object>) PgArrayParser.parse(bytes, RealType.INSTANCE::decodeUTF8Text);
        float[] vector = new float[list.size()];
        for (int i = 0; i < vector.length; i++) {
            vector[i] = (float) list.get(i);
        }
        return vector;
    }

    private int writeArrayAsBinary(ByteBuf buffer, @NotNull float[] array) {
        int bytesWritten = 0;
        for (float f : array) {
            bytesWritten += RealType.INSTANCE.writeAsBinary(buffer, f);
        }
        return bytesWritten;
    }

    static float[] readArrayAsBinary(ByteBuf buffer, final int dimension) {
        float[] array = new float[dimension];
        for (int i = 0; i < dimension; ++i) {
            int len = buffer.readInt();
            array[i] = RealType.INSTANCE.readBinaryValue(buffer, len);
        }
        return array;
    }
}

        int arrayLength = value.length;

        final int lenIndex = buffer.writerIndex();
        buffer.writeInt(0);
        buffer.writeInt(1); // one dimension
        buffer.writeInt(0); // flags bit 0: 0=no-nulls, 1=has-nulls
        buffer.writeInt(typElem());

        buffer.writeInt(arrayLength); // upper bound
        buffer.writeInt(arrayLength); // lower bound
        int bytesWritten = 4 + 4 + 4 + 8;

        int len = bytesWritten + writeArrayAsBinary(buffer, value);
        buffer.setInt(lenIndex, len);
        return INT32_BYTE_SIZE + len; // add also the size of the length itself
    
<methods>public int oid() ,public abstract float[] readBinaryValue(ByteBuf, int) ,public float[] readTextValue(ByteBuf, int) ,public abstract int typArray() ,public java.lang.String typDelim() ,public int typElem() ,public io.crate.types.Regproc typInput() ,public java.lang.String typName() ,public io.crate.types.Regproc typOutput() ,public io.crate.types.Regproc typReceive() ,public io.crate.types.Regproc typSend() ,public abstract java.lang.String type() ,public abstract java.lang.String typeCategory() ,public short typeLen() ,public int typeMod() ,public abstract int writeAsBinary(ByteBuf, float[]) ,public int writeAsText(ByteBuf, float[]) <variables>static final int INT32_BYTE_SIZE,private static final Logger LOGGER,private final non-sealed int oid,private final non-sealed java.lang.String typName,private final non-sealed int typeLen,private final non-sealed int typeMod