@Override
    public TensorType type(TypeContext<Reference> context) {
        TensorType trueType = getTrueExpression().type(context);
        TensorType falseType = getFalseExpression().type(context);
        return trueType.dimensionwiseGeneralizationWith(falseType).orElseThrow(() ->
            new IllegalArgumentException("An if expression must produce compatible types in both " +
                                         "alternatives, but the 'true' type is " + trueType + " while the " +
                                         "'false' type is " + falseType +
                                         "\n'true' branch: " + getTrueExpression() +
                                         "\n'false' branch: " + getFalseExpression())
        );
    }
The average probability that the condition of this node will evaluate to true, or null if not known
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/IfNode.java