table = ais().getTable(tableName);
RowStream stream = new RowStream ();
stream.operator = indexAncestorLookup(tableName);
stream.rowType = schema().tableRowType(table);
TInstance varchar = getTypesTranslator().typeForString();
TPreparedExpression[] updates = new TPreparedExpression[table.getColumns().size()];
// The Primary Key columns have already been added as query parameters
// by the indexAncestorLookup ($1,,) So start the new parameters from there
// And we don't want to add the PK columns as to be updated.
List<Column> pkList = table.getPrimaryKey().getColumns();
int paramIndex = pkList.size();
int index = 0;
for (Column column : table.getColumns()) {
if (!pkList.contains(column) && upColumns.contains(column)) {
updates[index] = new TPreparedParameter(paramIndex, varchar);
if (!column.getType().equals(varchar)) {
TCast cast = registryService().getCastsResolver().cast(varchar.typeClass(),
column.getType().typeClass());
updates[index] = new TCastExpression(updates[index], cast, column.getType());
}
paramIndex++;
}