Procedure catalog_proc = this.getProcedure("JoinProjection");
Statement catalog_stmt = this.getStatement(catalog_proc, "sql");
this.check(catalog_stmt);
// Grab the root node of the multi-partition query plan tree for this Statement
AbstractPlanNode root = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, false);
assertNotNull(root);
//validateNodeColumnOffsets(root);
// Grab the single-partition root node and make sure that they have the same
// output columns in their topmost send node
AbstractPlanNode spRoot = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);
assertNotNull(spRoot);
assertEquals(root.getOutputColumnGUIDCount(), spRoot.getOutputColumnGUIDCount());
PlannerContext context = PlannerContext.singleton();
assertNotNull(context);
for (int i = 0, cnt = root.getOutputColumnGUIDCount(); i < cnt; i++) {
Integer guid0 = root.getOutputColumnGUID(i);
PlanColumn col0 = context.get(guid0);
assertNotNull(col0);
Integer guid1 = spRoot.getOutputColumnGUID(i);
PlanColumn col1 = context.get(guid1);
assertNotNull(col1);
assertTrue(col0.equals(col1, false, true));
} // FOR