private String getStringContents(OperatorNode<ExpressionOperator> operator) {
        return switch (operator.getOperator()) {
            case LITERAL -> operator.getArgument(0, String.class);
            case VARREF -> {
                Preconditions.checkState(userQuery != null,
                        "properties must be available when trying to fetch user input");
                yield userQuery.properties().getString(operator.getArgument(0, String.class));
            }
            default -> throw newUnexpectedArgumentException(operator.getOperator(),
                    ExpressionOperator.LITERAL, ExpressionOperator.VARREF);
        };
    }
The YQL query language.

This class <em>must</em> be kept in lockstep with {@link VespaSerializer}.
Adding anything here will usually require a corresponding addition in
VespaSerializer.

@author Steinar Knutsen
@author Stian Kristoffersen
@author Simon Thoresen Hult
container-search/src/main/java/com/yahoo/search/yql/YqlParser.java