Better COLUMN_TYPE calculation