Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





#Java - Code Snippets for '#Org.apache.calcite.plan.hep.HepPlanner' - 1 code snippet(s) found

 Sample 1. Code Sample / Example / Snippet of org.apache.calcite.plan.hep.HepPlanner

  protected DiffRepository getDiffRepos() {

return DiffRepository.lookup(RelOptRulesTest.class);

}



@Test public void testReduceNestedCaseWhen() {

HepProgram preProgram = new HepProgramBuilder()

.build();



HepProgramBuilder builder = new HepProgramBuilder();

builder.addRuleClass(ReduceExpressionsRule.class);

HepPlanner hepPlanner = new HepPlanner(builder.build());

hepPlanner.addRule(ReduceExpressionsRule.FILTER_INSTANCE);



final String sql = "select sal "

+ "from emp "

+ "where case when (sal = 1000) then "

+ "(case when sal = 1000 then null else 1 end is null) else "

+ "(case when sal = 2000 then null else 1 end is null) end is true";

checkPlanning(tester, preProgram, hepPlanner, sql);

}


   Like      Feedback      org.apache.calcite.plan.hep.HepPlanner



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner