private Item buildGeoLocation(OperatorNode<ExpressionOperator> ast) {
        List<OperatorNode<ExpressionOperator>> args = ast.getArgument(1);
        Preconditions.checkArgument(args.size() == 4, "Expected 4 arguments, got %s.", args.size());
        String field = fetchFieldName(args.get(0));
        var coord_1 = degreesFromArg(args.get(1), true);
        var coord_2 = degreesFromArg(args.get(2), false);
        double radius = DistanceParser.parse(fetchLiteral(args.get(3)));
        var loc = new Location();
        if (coord_1.isLatitude && coord_2.isLongitude) {
            loc.setGeoCircle(coord_1.degrees, coord_2.degrees, radius);
        } else if (coord_2.isLatitude && coord_1.isLongitude) {
            loc.setGeoCircle(coord_2.degrees, coord_1.degrees, radius);
        } else {
            throw new IllegalArgumentException("Invalid geoLocation coordinates '"+coord_1+"' and '"+coord_2+"'");
        }
        var item = new GeoLocationItem(loc, field);
        String label = getAnnotation(ast, LABEL, String.class, null, "item label");
        if (label != null) {
            item.setLabel(label);
        }
        return item;
    }
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