@VisibleForTesting
    public Supplier<PageFilter> compileFilter(
            SqlFunctionProperties sqlFunctionProperties,
            RowExpression filter,
            boolean isOptimizeCommonSubExpression,
            Optional<String> classNameSuffix)
    {
        return compileFilter(sqlFunctionProperties, emptyMap(), filter, isOptimizeCommonSubExpression, classNameSuffix);
    }
@Test
    public void testCommonSubExpressionInFilter()
    {
        PageFunctionCompiler functionCompiler = new PageFunctionCompiler(createTestMetadataManager(), 0);

        Supplier<PageFilter> pageFilter = functionCompiler.compileFilter(SESSION.getSqlFunctionProperties(), new SpecialFormExpression(AND, BIGINT, ADD_X_Y_GREATER_THAN_2, ADD_X_Y_LESS_THAN_10), true, Optional.empty());

        Page input = createLongBlockPage(2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
        SelectedPositions positions = filter(pageFilter.get(), input);
        assertEquals(positions.size(), 3);
        assertEquals(positions.getPositions(), new int[] {2, 3, 4});
    }