private Item buildFunctionCall(OperatorNode<ExpressionOperator> ast) {
        List<String> names = ast.getArgument(0);
        Preconditions.checkArgument(names.size() == 1, "Expected 1 name, got %s.", names.size());
        return switch (names.get(0)) {
            case USER_QUERY -> fetchUserQuery();
            case RANGE -> buildRange(ast);
            case WAND -> buildWand(ast);
            case WEIGHTED_SET -> buildWeightedSet(ast);
            case DOT_PRODUCT -> buildDotProduct(ast);
            case GEO_LOCATION -> buildGeoLocation(ast);
            case NEAREST_NEIGHBOR -> buildNearestNeighbor(ast);
            case PREDICATE -> buildPredicate(ast);
            case RANK -> buildRank(ast);
            case WEAK_AND -> buildWeakAnd(ast);
            case USER_INPUT -> buildUserInput(ast);
            case NON_EMPTY -> ensureNonEmpty(ast);
            default -> throw newUnexpectedArgumentException(names.get(0), DOT_PRODUCT, GEO_LOCATION, NEAREST_NEIGHBOR,
                                                            RANGE, RANK, USER_QUERY, WAND, WEAK_AND, WEIGHTED_SET,
                                                            PREDICATE, USER_INPUT, NON_EMPTY);
        };
    }
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