@Override
    protected OrderedTensorType lazyGetType() {
        if ( ! allInputTypesPresent(1)) return null;

        OrderedTensorType inputType = inputs.get(0).type().orElse(null);
        if (inputType == null) return null;

        OrderedTensorType.Builder builder = new OrderedTensorType.Builder(inputType.type().valueType());
        for (TensorType.Dimension dimension : inputType.dimensions())
            builder.add(dimension.withName(dimension.name().equals(from) ? to : dimension.name()));
        return builder.build();
    }
Renames a tensor dimension to relax dimension constraints

@author bratseth
model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/Rename.java