public RowExpression extract(PlanNode node)
    {
        return node.accept(new Visitor(domainTranslator, functionAndTypeManager), null);
    }
@Test
    public void testInnerJoinPropagatesPredicatesViaEquiConditions()
    {
        Map<VariableReferenceExpression, ColumnHandle> leftAssignments = Maps.filterKeys(scanAssignments, Predicates.in(ImmutableList.of(AV, BV, CV)));
        TableScanNode leftScan = tableScanNode(leftAssignments);

        Map<VariableReferenceExpression, ColumnHandle> rightAssignments = Maps.filterKeys(scanAssignments, Predicates.in(ImmutableList.of(DV, EV, FV)));
        TableScanNode rightScan = tableScanNode(rightAssignments);

        FilterNode left = filter(leftScan, equals(AV, bigintLiteral(10)));

        // predicates on "a" column should be propagated to output symbols via join equi conditions
        PlanNode node = new JoinNode(
                Optional.empty(),
                newId(),
                JoinType.INNER,
                left,
                rightScan,
                ImmutableList.of(new EquiJoinClause(AV, DV)),
                ImmutableList.<VariableReferenceExpression>builder()
                        .addAll(rightScan.getOutputVariables())
                        .build(),
                Optional.empty(),
                Optional.empty(),
                Optional.empty(),
                Optional.empty(),
                ImmutableMap.of());

        RowExpression effectivePredicate = effectivePredicateExtractor.extract(node);

        assertEquals(
                normalizeConjuncts(effectivePredicate),
                normalizeConjuncts(equals(DV, bigintLiteral(10))));
    }