presto-main/src/main/java/io/prestosql/sql/planner/DeterminismEvaluator.java/DeterminismEvaluator/isDeterministic
class DeterminismEvaluator:    public static boolean isDeterministic(Expression expression, Function<FunctionCall, FunctionMetadata> functionMetadataSupplier)
    {
        requireNonNull(functionMetadataSupplier, "functionMetadataSupplier is null");
        requireNonNull(expression, "expression is null");

        AtomicBoolean deterministic = new AtomicBoolean(true);
        new Visitor(functionMetadataSupplier).process(expression, deterministic);
        return deterministic.get();
    }