presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/RewriteSpatialPartitioningAggregation.java/RewriteSpatialPartitioningAggregation/isStEnvelopeFunctionCall
class RewriteSpatialPartitioningAggregation:    private boolean isStEnvelopeFunctionCall(Expression expression, ResolvedFunction stEnvelopeFunction)
    {
        if (!(expression instanceof FunctionCall)) {
            return false;
        }

        FunctionCall functionCall = (FunctionCall) expression;
        return ResolvedFunction.fromQualifiedName(functionCall.getName())
                .map(ResolvedFunction::getFunctionId)
                .map(stEnvelopeFunction.getFunctionId()::equals)
                .orElseThrow(() -> new PrestoException(GENERIC_INTERNAL_ERROR, String.format("Function call has not been resolved: %s", expression)));
    }