Better COLUMN_TYPE calculation

Please check the sample application https://gist.github.com/ignatov/8690304