public PickTableLayoutForPredicate pickTableLayoutForPredicate()
    {
        return new PickTableLayoutForPredicate(metadata);
    }
@Test
    public void ruleAddedTableLayoutToFilterTableScan()
    {
        Map<String, Domain> filterConstraint = ImmutableMap.<String, Domain>builder()
                .put("orderstatus", singleValue(createVarcharType(1), utf8Slice("F")))
                .build();
        tester().assertThat(pickTableLayout.pickTableLayoutForPredicate())
                .on(p -> {
                    p.variable("orderstatus", createVarcharType(1));
                    return p.filter(p.rowExpression("orderstatus = CAST ('F' AS VARCHAR(1))"),
                            p.tableScan(
                                    ordersTableHandle,
                                    ImmutableList.of(p.variable("orderstatus", createVarcharType(1))),
                                    ImmutableMap.of(p.variable("orderstatus", createVarcharType(1)), new TpchColumnHandle("orderstatus", createVarcharType(1)))));
                })
                .matches(
                        constrainedTableScanWithTableLayout("orders", filterConstraint, ImmutableMap.of("orderstatus", "orderstatus")));

        tester().assertThat(pickTableLayout.pickTableLayoutForPredicate())
                .on(p -> {
                    p.variable("orderstatus", createVarcharType(1));
                    return p.filter(p.rowExpression("orderstatus = CAST ('F' AS VARCHAR(1))"),
                            p.tableScan(
                                    ordersTableHandle,
                                    ImmutableList.of(variable("orderstatus", createVarcharType(1))),
                                    ImmutableMap.of(variable("orderstatus", createVarcharType(1)), new TpchColumnHandle("orderstatus", createVarcharType(1)))));
                })
                .matches(
                        constrainedTableScanWithTableLayout("orders", filterConstraint, ImmutableMap.of("orderstatus", "orderstatus")));
    }