join = join.join(tableName, "t");
} else {
join = query.from(tableName, "t");
}
if (pred == null) {
join.join(uris.getShortTableName(), "pu").on("id", "t.pred");
}
join.leftjoin(uris.getShortTableName(), "cu").on("id", "t.ctx");
join.leftjoin(uris.getLongTableName(), "clu").on("id", "t.ctx");
join.leftjoin(bnodes.getName(), "cb").on("id", "t.ctx");
join.leftjoin(uris.getShortTableName(), "su").on("id", "t.subj");