@Test
void implementOtherLogicalOperators() {

  when(settings.getSettingValue(Settings.Key.QUERY_SIZE_LIMIT)).thenReturn(200);
  String indexName = "test";
  NamedExpression include = named("age", ref("age", INTEGER));
  ReferenceExpression exclude = ref("name", STRING);
  ReferenceExpression dedupeField = ref("name", STRING);
  Expression filterExpr = literal(ExprBooleanValue.of(true));
  List<NamedExpression> groupByExprs = Arrays.asList(named("age", ref("age", INTEGER)));
  List<NamedAggregator> aggregators =
      Arrays.asList(named("avg(age)", new AvgAggregator(Arrays.asList(ref("age", INTEGER)),
          DOUBLE)));
  Map<ReferenceExpression, ReferenceExpression> mappings =
      ImmutableMap.of(ref("name", STRING), ref("lastname", STRING));
  Pair<ReferenceExpression, Expression> newEvalField =
      ImmutablePair.of(ref("name1", STRING), ref("name", STRING));
  Integer sortCount = 100;
  Pair<Sort.SortOption, Expression> sortField =
      ImmutablePair.of(Sort.SortOption.PPL_ASC, ref("name1", STRING));
  LogicalPlan plan =
      project(
          LogicalPlanDSL.dedupe(
              sort(
                  eval(
                      remove(
                          rename(
                              relation(indexName),
                              mappings),
                          exclude),
                      newEvalField),
                  sortCount,
                  sortField),
              dedupeField),
          include);
  Table index = new ElasticsearchIndex(client, settings, indexName);
  assertEquals(
      PhysicalPlanDSL.project(
          PhysicalPlanDSL.dedupe(
              PhysicalPlanDSL.sort(
                  PhysicalPlanDSL.eval(
                      PhysicalPlanDSL.remove(
                          PhysicalPlanDSL.rename(
                              new ElasticsearchIndexScan(client, settings, indexName,
                                  exprValueFactory),
                              mappings),
                          exclude),
                      newEvalField),
                  sortCount,
                  sortField),
              dedupeField),
          include),
      index.implement(plan));
}