@Test public void shouldProducePlanWhenOrderByClauseWithScoreIsUsed() { schemata = schemataBuilder.addTable("dna:someTable", "column1", "column2", "column3").build(); query = builder.selectStar().from("dna:someTable AS t1").where().path("t1").isEqualTo(1L).end().orderBy().ascending() .fullTextSearchScore("t1").end().query(); initQueryContext(); plan = planner.createPlan(queryContext, query); assertThat(problems.hasErrors(), is(false)); print(plan); assertThat(plan.getType(), is(PlanNode.Type.SORT)); assertThat(plan.getSelectors(), is(selectors("t1"))); }
@Override public PlanNode createPlan( QueryContext context, QueryCommand query ) { PlanNode plan = null; if (query instanceof Query) { plan = createCanonicalPlan(context, (Query)query); } else { plan = createCanonicalPlan(context, (SetQuery)query); } return plan; }
CanonicalPlanner implements Planner { @Override public PlanNode createPlan( QueryContext context, QueryCommand query ) { PlanNode plan = null; if (query instanceof Query) { plan = createCanonicalPlan(context, (Query)query); } else { plan = createCanonicalPlan(context, (SetQuery)query); } return plan; } }
CanonicalPlanner implements Planner { @Override public PlanNode createPlan( QueryContext context, QueryCommand query ) { PlanNode plan = null; if (query instanceof Query) { plan = createCanonicalPlan(context, (Query)query); } else { plan = createCanonicalPlan(context, (SetQuery)query); } return plan; }  }
CanonicalPlanner implements Planner { @Override public PlanNode createPlan( QueryContext context, QueryCommand query ) { PlanNode plan = null; if (query instanceof Query) { plan = createCanonicalPlan(context, (Query)query); } else { plan = createCanonicalPlan(context, (SetQuery)query); } return plan; }  @Override PlanNode createPlan( QueryContext context,
                                QueryCommand query ); }
CanonicalPlanner implements Planner { @Override public PlanNode createPlan( QueryContext context, QueryCommand query ) { PlanNode plan = null; if (query instanceof Query) { plan = createCanonicalPlan(context, (Query)query); } else { plan = createCanonicalPlan(context, (SetQuery)query); } return plan; }  @Override PlanNode createPlan( QueryContext context,
                                QueryCommand query );  }