// first count the number of generated columns
for ( int i = 1; i <= columnCount; i++ )
{
if ( i < firstColumn ) { continue; }
ResultColumnDescriptor rcd = resultDescription.getColumnDescriptor( i );
if ( rcd.hasGenerationClause() ) { generatedColumnCount++; }
}
// now allocate and populate support structures
generatedColumnPositions = new int[ generatedColumnCount ];
normalizedGeneratedValues = new DataValueDescriptor[ generatedColumnCount ];
int idx = 0;
for ( int i = 1; i <= columnCount; i++ )
{
if ( i < firstColumn ) { continue; }
ResultColumnDescriptor rcd = resultDescription.getColumnDescriptor( i );
if ( rcd.hasGenerationClause() )
{
generatedColumnPositions[ idx ] = i;
normalizedGeneratedValues[ idx ] = emptyRow.getColumn( i );
idx++;