private boolean nonDefaultPrecedence(CompositeNode parent) {
        if ( parent == null) return false;
        if ( ! (parent instanceof OperationNode operationParent)) return false;

        // The last line below can only be correct if both only have one operator.
        // Getting this correct is impossible without more work.
        // So for now we only handle the simple case correctly, and use a safe approach by adding
        // extra parenthesis just in case....
        if ((operationParent.operators.size() != 1) || (operators.size() != 1)) {
            return true;
        }
        return operationParent.operators.get(0).hasPrecedenceOver(this.operators.get(0));
    }
Returns true if this node has lower precedence than the parent
(even though by virtue of being a node it will be calculated before the parent).
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/OperationNode.java