public RowExpression extract(PlanNode node)
    {
        return node.accept(new Visitor(domainTranslator, functionAndTypeManager), null);
    }
@Test
    public void testAggregation()
    {
        PlanNode node = new AggregationNode(
                Optional.empty(),
                newId(),
                filter(baseTableScan,
                        and(
                                equals(AV, DV),
                                equals(BV, EV),
                                equals(CV, FV),
                                lessThan(DV, bigintLiteral(10)),
                                lessThan(CV, DV),
                                greaterThan(AV, bigintLiteral(2)),
                                equals(EV, FV))),
                ImmutableMap.of(
                        CV, count(metadata.getFunctionAndTypeManager()),
                        DV, count(metadata.getFunctionAndTypeManager())),
                singleGroupingSet(ImmutableList.of(AV, BV, CV)),
                ImmutableList.of(),
                AggregationNode.Step.FINAL,
                Optional.empty(),
                Optional.empty(),
                Optional.empty());

        RowExpression effectivePredicate = effectivePredicateExtractor.extract(node);

        // Rewrite in terms of group by symbols
        assertEquals(normalizeConjuncts(effectivePredicate),
                normalizeConjuncts(
                        lessThan(AV, bigintLiteral(10)),
                        lessThan(BV, AV),
                        greaterThan(AV, bigintLiteral(2)),
                        equals(BV, CV)));
    }