ProjectionPlanNode projectionNode = new ProjectionPlanNode();
TupleAddressExpression tae = new TupleAddressExpression();
NodeSchema proj_schema = new NodeSchema();
// This planner-generated column is magic.
proj_schema.addColumn(new SchemaColumn("VOLT_TEMP_TABLE",
"VOLT_TEMP_TABLE",
"tuple_address",
"tuple_address",
tae));
// get the set of columns affected by indexes
Set<String> affectedColumns = getIndexedColumnSetForTable(targetTable);
// add the output columns we need to the projection
//
// Right now, the EE is going to use the original column names
// and compare these to the persistent table column names in the
// update executor in order to figure out which table columns get
// updated. We'll associate the actual values with VOLT_TEMP_TABLE
// to avoid any false schema/column matches with the actual table.
for (Entry<Column, AbstractExpression> col : m_parsedUpdate.columns.entrySet()) {
String tableName = col.getKey().getTypeName();
AbstractExpression expr = col.getValue();
expr.setInBytes(col.getKey().getInbytes());
proj_schema.addColumn(new SchemaColumn("VOLT_TEMP_TABLE",
"VOLT_TEMP_TABLE",
tableName,
tableName,
expr));