public void rightJoinPersistence() throws Exception {
createTable("test", "c", "cid int not null primary key, name varchar(255)");
int oid = createTable("test", "o", "oid int not null primary key, c_id int, priority int, " + akibanFK("c_id", "c", "cid"));
AkibanInformationSchema ais = ddl().getAIS(session());
TableName groupName = ais.getTable(oid).getGroup().getName();
GroupIndex createdGI = createRightGroupIndex(groupName, "my_gi", "c.name", "o.priority");
assertEquals("join type", Index.JoinType.RIGHT, createdGI.getJoinType());
GroupIndex confirmationGi = ddl().getAIS(session()).getGroup(groupName).getIndex("my_gi");
assertNotNull("gi not found", confirmationGi);
safeRestartTestServices();
GroupIndex reconstructedGi = ddl().getAIS(session()).getGroup(groupName).getIndex("my_gi");
assertNotSame("GIs were same instance", createdGI, reconstructedGi);
assertEquals("join type", Index.JoinType.RIGHT, reconstructedGi.getJoinType());
}