src/java/org/apache/cassandra/db/TreeMapBackedSortedColumns.java
/*
     * If we find an old column that has the same name
     * the ask it to resolve itself else add the new column
    */
If we find an old column that has the same name
the ask it to resolve itself else add the new column
If we find an old column that has the same name the ask it to resolve itself else add the new column
public void addColumn(IColumn column, Allocator allocator)
    {
        ByteBuffer name = column.name();
        IColumn oldColumn = map.put(name, column);
        if (oldColumn != null)
        {
            if (oldColumn instanceof SuperColumn)
            {
                assert column instanceof SuperColumn;
                ((SuperColumn) oldColumn).putColumn((SuperColumn)column, allocator);
                map.put(name,  oldColumn);
            }
            else
            {
                IColumn reconciledColumn = column.reconcile(oldColumn, allocator);
                map.put(name, reconciledColumn);
            }
        }
    }
public void addColumn ( IColumn column , Allocator allocator ) { ByteBuffer name = column . name ( ) ; IColumn oldColumn = map . put ( name , column ) ; if ( oldColumn != null ) { if ( oldColumn instanceof SuperColumn ) { assert column instanceof SuperColumn ; ( ( SuperColumn ) oldColumn ) . putColumn ( ( SuperColumn ) column , allocator ) ; map . put ( name , oldColumn ) ; } else { IColumn reconciledColumn = column . reconcile ( oldColumn , allocator ) ; map . put ( name , reconciledColumn ) ; } } }
If we find an old column that has the same name
 the ask it to resolve itself else add the new column
If we find an old column that has the same name the ask it to resolve itself else add the new column
// this is a slightly unusual way to structure this; a more natural way is shown in ThreadSafeSortedColumns, // but TreeMap lacks putAbsent.  Rather than split it into a "get, then put" check, we do it as follows, // which saves the extra "get" in the no-conflict case [for both normal and super columns], // in exchange for a re-put in the SuperColumn case. // since oldColumn is where we've been accumulating results, it's usually going to be faster to // add the new one to the old, then place old back in the Map, rather than copy the old contents // into the new Map entry. // calculate reconciled col from old (existing) col and new col