presto-main/src/main/java/io/prestosql/metadata/FunctionRegistry.java/FunctionRegistry/canResolveOperator
class FunctionRegistry:    public boolean canResolveOperator(OperatorType operatorType, Type returnType, List<? extends Type> argumentTypes)
    {
        try {
            Signature signature = new Signature(
                    mangleOperatorName(operatorType),
                    returnType.getTypeSignature(),
                    argumentTypes.stream().map(Type::getTypeSignature).collect(toImmutableList()));
            // TODO: this is hacky, but until the magic literal and row field reference hacks are cleaned up it's difficult to implement this.
            getScalarFunctionImplementation(new ResolvedFunction(signature, toFunctionId(signature)));
            return true;
        }
        catch (PrestoException e) {
            if (e.getErrorCode().getCode() == FUNCTION_IMPLEMENTATION_MISSING.toErrorCode().getCode()) {
                return false;
            }
            throw e;
        }
    }