@Override
    protected ValueUpdate readTensorModifyUpdate(DataType type) {
        byte operationId = getByte(null);
        var operation = decodeOperation(operationId);
        if (operation == null) {
            throw new DeserializationException("Unknown operation id " + operationId + " for tensor modify update");
        }
        if (!(type instanceof TensorDataType)) {
            throw new DeserializationException("Expected tensor data type, got " + type);
        }
        var createNonExistingCells = decodeCreateNonExistingCells(operationId);
        if (createNonExistingCells) {
            // Read the default cell value (but it is not used by TensorModifyUpdate).
            getDouble(null);
        }
        TensorDataType tensorDataType = (TensorDataType)type;
        TensorType tensorType = tensorDataType.getTensorType();
        TensorType convertedType = TensorModifyUpdate.convertDimensionsToMapped(tensorType);

        TensorFieldValue tensor = new TensorFieldValue(convertedType);
        tensor.deserialize(this);
        return new TensorModifyUpdate(operation, tensor, createNonExistingCells);
    }
Class used for de-serializing documents on the current head document format.

@author baldersheim
document/src/main/java/com/yahoo/document/serialization/VespaDocumentDeserializerHead.java