Search in sources :

Example 1 with MergeFilters

use of io.crate.planner.optimizer.rule.MergeFilters in project crate by crate.

the class OptimizerTest method test_rule_filtering.

@Test
public void test_rule_filtering() {
    SessionSettings sessionSettings = new SessionSettings("User", SearchPath.pathWithPGCatalogAndDoc(), true, Set.of(MergeFilters.class), true);
    List<Rule<?>> rules = Optimizer.removeExcludedRules(List.of(new MergeFilters()), sessionSettings.excludedOptimizerRules());
    assertThat(rules.isEmpty(), is(true));
    rules = Optimizer.removeExcludedRules(List.of(new MoveFilterBeneathHashJoin()), sessionSettings.excludedOptimizerRules());
    assertThat(rules.size(), is(1));
}
Also used : MoveFilterBeneathHashJoin(io.crate.planner.optimizer.rule.MoveFilterBeneathHashJoin) MergeFilters(io.crate.planner.optimizer.rule.MergeFilters) SessionSettings(io.crate.metadata.settings.SessionSettings) Test(org.junit.Test)

Aggregations

SessionSettings (io.crate.metadata.settings.SessionSettings)1 MergeFilters (io.crate.planner.optimizer.rule.MergeFilters)1 MoveFilterBeneathHashJoin (io.crate.planner.optimizer.rule.MoveFilterBeneathHashJoin)1 Test (org.junit.Test)1