public RowExpression rewriteExpression(RowExpression expression, Predicate<VariableReferenceExpression> variableScope)
    {
        checkArgument(determinismEvaluator.isDeterministic(expression), "Only deterministic expressions may be considered for rewrite");
        return rewriteExpression(expression, variableScope, true);
    }
@Test
    public void testTriviallyRewritable()
    {
        EqualityInference.Builder builder = new EqualityInference.Builder(METADATA);
        RowExpression expression = builder.build()
                .rewriteExpression(someExpression("a1", "a2"), matchesVariables("a1", "a2"));

        assertEquals(expression, someExpression("a1", "a2"));
    }