sourceLatitude, sourceLongitude, targetLatitude, targetLongitude, DistanceUnit.METERS);
}
@Override
public Symbol normalizeSymbol(Function symbol) {
Symbol arg1 = symbol.arguments().get(0);
Symbol arg2 = symbol.arguments().get(1);
DataType arg1Type = DataTypeVisitor.fromSymbol(arg1);
DataType arg2Type = DataTypeVisitor.fromSymbol(arg2);
boolean arg1IsReference = true;
boolean literalConverted = false;
short numLiterals = 0;
if (arg1.symbolType().isValueSymbol()) {
numLiterals++;
arg1IsReference = false;
if (!arg1Type.equals(DataTypes.GEO_POINT)) {
literalConverted = true;
arg1 = Literal.toLiteral(arg1, DataTypes.GEO_POINT);
}
} else {
validateType(arg1, arg1Type);
}
if (arg2.symbolType().isValueSymbol()) {
numLiterals++;
if (!arg2Type.equals(DataTypes.GEO_POINT)) {
literalConverted = true;
arg2 = Literal.toLiteral(arg2, DataTypes.GEO_POINT);
}