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 testUnrewritable()
    {
        EqualityInference.Builder builder = new EqualityInference.Builder(METADATA);
        addEquality("a1", "b1", builder);
        addEquality("a2", "b2", builder);
        EqualityInference inference = builder.build();

        assertNull(inference.rewriteExpression(someExpression("a1", "a2"), matchesVariables("b1", "c1")));
        assertNull(inference.rewriteExpression(someExpression("c1", "c2"), matchesVariables("a1", "a2")));
    }