public PickTableLayoutForPredicate pickTableLayoutForPredicate()
    {
        return new PickTableLayoutForPredicate(metadata);
    }
@Test
    public void nonDeterministicPredicate()
    {
        Type orderStatusType = createVarcharType(1);
        tester().assertThat(pickTableLayout.pickTableLayoutForPredicate())
                .on(p -> {
                    p.variable("orderstatus", orderStatusType);
                    return p.filter(p.rowExpression("orderstatus = 'O' AND rand() = 0"),
                            p.tableScan(
                                    ordersTableHandle,
                                    ImmutableList.of(p.variable("orderstatus", orderStatusType)),
                                    ImmutableMap.of(p.variable("orderstatus", orderStatusType), new TpchColumnHandle("orderstatus", orderStatusType))));
                })
                .matches(
                        filter("rand() = 0",
                                constrainedTableScanWithTableLayout(
                                        "orders",
                                        ImmutableMap.of("orderstatus", singleValue(orderStatusType, utf8Slice("O"))),
                                        ImmutableMap.of("orderstatus", "orderstatus"))));

        tester().assertThat(pickTableLayout.pickTableLayoutForPredicate())
                .on(p -> {
                    p.variable("orderstatus", orderStatusType);
                    return p.filter(p.rowExpression("orderstatus = 'O' AND rand() = 0"),
                            p.tableScan(
                                    ordersTableHandle,
                                    ImmutableList.of(variable("orderstatus", orderStatusType)),
                                    ImmutableMap.of(variable("orderstatus", orderStatusType), new TpchColumnHandle("orderstatus", orderStatusType))));
                })
                .matches(
                        filter("rand() = 0",
                                constrainedTableScanWithTableLayout(
                                        "orders",
                                        ImmutableMap.of("orderstatus", singleValue(orderStatusType, utf8Slice("O"))),
                                        ImmutableMap.of("orderstatus", "orderstatus"))));
    }