private static Optional<TensorType> convertTensorType(DataType fieldType) {
        if ( ! ( fieldType instanceof TensorDataType)) return Optional.empty();
        return Optional.of(((TensorDataType)fieldType).getTensorType());
    }
Converts to the right attribute type from a field datatype
config-model/src/main/java/com/yahoo/schema/document/Attribute.java