presto-main/src/main/java/io/prestosql/metadata/FunctionRegistry.java/FunctionRegistry/getCoercion
class FunctionRegistry:    public ResolvedFunction getCoercion(OperatorType operatorType, Type fromType, Type toType)
    {
        checkArgument(operatorType == OperatorType.CAST || operatorType == OperatorType.SATURATED_FLOOR_CAST);
        try {
            Signature signature = new Signature(mangleOperatorName(operatorType), toType.getTypeSignature(), ImmutableList.of(fromType.getTypeSignature()));
            ResolvedFunction resolvedFunction = resolveCoercion(signature);
            getScalarFunctionImplementation(resolvedFunction);
            return resolvedFunction;
        }
        catch (PrestoException e) {
            if (e.getErrorCode().getCode() == FUNCTION_IMPLEMENTATION_MISSING.toErrorCode().getCode()) {
                throw new OperatorNotFoundException(operatorType, ImmutableList.of(fromType), toType.getTypeSignature());
            }
            throw e;
        }
    }