PlanNode leftProject = new PlanNode(Type.PROJECT, leftAccess, selector("type1"));
leftProject.setProperty(Property.PROJECT_COLUMNS, columns(column("type1", "a1"), column("type1", "a2")));
PlanNode leftSelect1 = new PlanNode(Type.SELECT, leftProject, selector("type1"));
leftSelect1.setProperty(Property.SELECT_CRITERIA, new FullTextSearch(selector("type1"), "a1", "something"));
PlanNode leftSelect2 = new PlanNode(Type.SELECT, leftSelect1, selector("type1"));
leftSelect2.setProperty(Property.SELECT_CRITERIA, new SetCriteria(new PropertyValue(selector("type1"), "primaryType"),
new Literal("t1"), new Literal("t0")));
PlanNode leftSelect3 = new PlanNode(Type.SELECT, leftSelect2, selector("type1"));
leftSelect3.setProperty(Property.SELECT_CRITERIA, new SetCriteria(new PropertyValue(selector("type1"), "mixins"),
new Literal("t3"), new Literal("t4")));
PlanNode leftSource = new PlanNode(Type.SOURCE, leftSelect3, selector("type1"));
leftSource.setProperty(Property.SOURCE_NAME, selector("all"));
leftSource.setProperty(Property.SOURCE_ALIAS, selector("type1"));
leftSource.setProperty(Property.SOURCE_COLUMNS, context.getSchemata().getTable(selector("all")).getColumns());
PlanNode rightAccess = new PlanNode(Type.ACCESS, join, selector("type2"));
PlanNode rightProject = new PlanNode(Type.PROJECT, rightAccess, selector("type2"));
rightProject.setProperty(Property.PROJECT_COLUMNS, columns(column("type2", "a3"), column("type2", "a4")));
PlanNode rightSelect1 = new PlanNode(Type.SELECT, rightProject, selector("type2"));
rightSelect1.setProperty(Property.SELECT_CRITERIA, new SetCriteria(new PropertyValue(selector("type2"), "primaryType"),
new Literal("t2"), new Literal("t0")));
PlanNode rightSelect2 = new PlanNode(Type.SELECT, rightSelect1, selector("type2"));
rightSelect2.setProperty(Property.SELECT_CRITERIA, new SetCriteria(new PropertyValue(selector("type2"), "mixins"),
new Literal("t4"), new Literal("t5")));
PlanNode rightSource = new PlanNode(Type.SOURCE, rightSelect2, selector("type2"));
rightSource.setProperty(Property.SOURCE_NAME, selector("all"));
rightSource.setProperty(Property.SOURCE_ALIAS, selector("type2"));
rightSource.setProperty(Property.SOURCE_COLUMNS, context.getSchemata().getTable(selector("all")).getColumns());