Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
*
* <ul>
* <li>{@link FilterToCalcRule} creates this from a {@link LogicalFilter}
* <li>{@link ProjectToCalcRule} creates this from a {@link LogicalFilter}
* <li>{@link ProjectToCalcRule} creates this from a {@link LogicalProject}
* <li>{@link org.apache.calcite.rel.rules.FilterCalcMergeRule}
* merges this with a {@link LogicalFilter}
* <li>{@link org.apache.calcite.rel.rules.ProjectCalcMergeRule}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class TraitPropagationTest {
RelOptUtil.dumpPlan("LOGICAL PLAN", planned, SqlExplainFormat.TEXT,
SqlExplainLevel.ALL_ATTRIBUTES));
}
final RelMetadataQuery mq = RelMetadataQuery.instance();
final RelMetadataQuery mq = planned.getCluster().getMetadataQuery();
assertEquals("Sortedness was not propagated", 3,
mq.getCumulativeCost(planned).getRows(), 0);
}
Expand Down Expand Up @@ -323,7 +323,7 @@ private static class PhysProj extends Project implements Phys {
public static PhysProj create(final RelNode input,
final List<RexNode> projects, RelDataType rowType) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = RelMetadataQuery.instance();
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet =
cluster.traitSet().replace(PHYSICAL)
.replaceIfs(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ public VolcanoPlannerTraitTest() {
RelOptCluster cluster = newCluster(planner);
NoneTinyLeafRel leaf = new NoneTinyLeafRel(cluster, "noneLeafRel");
planner.setRoot(leaf);
RelOptCost cost = planner.getCost(leaf, RelMetadataQuery.instance());
RelOptCost cost = planner.getCost(leaf, cluster.getMetadataQuery());

assertTrue(cost.isInfinite());

planner.setNoneConventionHasInfiniteCost(false);
cost = planner.getCost(leaf, RelMetadataQuery.instance());
cost = planner.getCost(leaf, cluster.getMetadataQuery());
assertTrue(!cost.isInfinite());
}

Expand Down Expand Up @@ -342,7 +342,7 @@ public RelNode convert(
RelTrait fromTrait = rel.getTraitSet().getTrait(this);

if (conversionMap.containsKey(fromTrait)) {
final RelMetadataQuery mq = RelMetadataQuery.instance();
final RelMetadataQuery mq = rel.getCluster().getMetadataQuery();
for (Pair<RelTrait, ConverterRule> traitAndRule
: conversionMap.get(fromTrait)) {
RelTrait trait = traitAndRule.left;
Expand Down
Loading