public static Property<ApplyNode, List<Symbol>> correlation() { return property("correlation", ApplyNode::getCorrelation); } }
public static Property<TopNNode, TopNNode.Step> step() { return property("step", TopNNode::getStep); } }
public static Property<LateralJoinNode, PlanNode> subquery() { return property("subquery", LateralJoinNode::getSubquery); } }
public static Property<LimitNode, Long> count() { return property("count", LimitNode::getCount); } }
public static Property<SampleNode, SampleNode.Type> sampleType() { return property("sampleType", SampleNode::getSampleType); } }
public static Property<LateralJoinNode, List<Symbol>> correlation() { return property("correlation", LateralJoinNode::getCorrelation); }
public static Property<SampleNode, Double> sampleRatio() { return property("sampleRatio", SampleNode::getSampleRatio); }
public static Property<PlanNode, List<PlanNode>> sources() { return property("sources", PlanNode::getSources); }
public static Property<AggregationNode, List<Symbol>> groupingColumns() { return property("groupingKeys", AggregationNode::getGroupingKeys); }
public static Property<AggregationNode, AggregationNode.Step> step() { return property("step", AggregationNode::getStep); } }
public static Property<ValuesNode, List<List<Expression>>> rows() { return property("rows", ValuesNode::getRows); } }
public static Property<JoinNode, RelNode> build() { return property("build", JoinNode::getBuild); }
public static Property<SingleSourceRelNode, RelNode> source() { return property("source", SingleSourceRelNode::getSource); } }
public static Property<JoinNode, RelNode> probe() { return property("probe", JoinNode::getProbe); }
public static Property<ScanNode, String> tableName() { return property("tableName", ScanNode::getTableName); }
@Test public void propertyMatchers() { Pattern<String> aString = typeOf(String.class); Property<String, Integer> length = Property.property("length", String::length); String string = "a"; assertMatch(aString.with(length.equalTo(1)), string); assertMatch(project().with(source().matching(scan())), new ProjectNode(new ScanNode("T"))); assertMatch(aString.with(length.matching(any())), string); assertMatch(aString.with(length.matching(x -> x > 0)), string); assertMatch(aString.with(length.matching((Number x) -> x.intValue() > 0)), string); assertNoMatch(aString.with(length.equalTo(0)), string); assertNoMatch(project().with(source().matching(scan())), new ProjectNode(new ProjectNode(new ScanNode("T")))); assertNoMatch(aString.with(length.matching(typeOf(Void.class))), string); assertNoMatch(aString.with(length.matching(x -> x < 1)), string); assertNoMatch(aString.with(length.matching((Number x) -> x.intValue() < 1)), string); }
public static Property<SingleSourceRelNode, RelNode> source() { return property("source", SingleSourceRelNode::getSource); } }
public static Property<JoinNode, RelNode> probe() { return property("probe", JoinNode::getProbe); }
public static Property<JoinNode, RelNode> build() { return property("build", JoinNode::getBuild); }
public static Property<ScanNode, String> tableName() { return property("tableName", ScanNode::getTableName); }