use of org.apache.calcite.rel.rules.ProjectJoinTransposeRule in project calcite by apache.
the class RelOptRulesTest method testProjectJoinTransposeItem.
@Test
void testProjectJoinTransposeItem() {
ProjectJoinTransposeRule projectJoinTransposeRule = CoreRules.PROJECT_JOIN_TRANSPOSE.config.withOperandFor(Project.class, Join.class).withPreserveExprCondition(RelOptRulesTest::skipItem).toRule();
final String sql = "select t1.c_nationkey[0], t2.c_nationkey[0]\n" + "from sales.customer as t1\n" + "left outer join sales.customer as t2\n" + "on t1.c_nationkey[0] = t2.c_nationkey[0]";
sql(sql).withDynamicTable().withRule(projectJoinTransposeRule).check();
}
Aggregations