atts.put(Label.TABLE_NAME,
PrimitiveExplainer.getInstance(tableName.getTableName()));
for (int i = 0; i < plan.ncols; i++) {
atts.put(Label.COLUMN_NAME,
PrimitiveExplainer.getInstance(foreignKey.getReferencingColumns().get(i).getName()));
CompoundExplainer var = new CompoundExplainer(Type.VARIABLE);
var.addAttribute(Label.BINDING_POSITION,
PrimitiveExplainer.getInstance(plan.ncols + i));
atts.put(Label.EXPRESSIONS, var);
}
context.putExtraInfo(plan.plannable,
new CompoundExplainer(Type.EXTRA_INFO, atts));
Explainer explainer = plan.plannable.getExplainer(context);
LOG.debug("Plan for " + foreignKey.getConstraintName().getTableName() + ":\n" +
Strings.join(new DefaultFormatter(tableName.getSchemaName()).format(explainer)));
}
return plan;