@Test
void shouldDiscardPhysicalFilterIfConditionPushedDown() {

  when(settings.getSettingValue(Settings.Key.QUERY_SIZE_LIMIT)).thenReturn(200);
  ReferenceExpression field = ref("name", STRING);
  NamedExpression named = named("n", field);
  Expression filterExpr = dsl.equal(field, literal("John"));
  String indexName = "test";
  ElasticsearchIndex index = new ElasticsearchIndex(client, settings, indexName);
  PhysicalPlan plan = index.implement(
      project(
          filter(
              relation(indexName),
              filterExpr
          ),
          named));
  assertTrue(plan instanceof ProjectOperator);
  assertTrue(((ProjectOperator) plan).getInput() instanceof ElasticsearchIndexScan);
}