private void alterColumnType ( TableInfo tableInfo , CQLTranslator translator , ColumnInfo column ) throws Exception { StringBuilder alterColumnTypeQuery = new StringBuilder ( "ALTER TABLE " ) ; translator . ensureCase ( alterColumnTypeQuery , tableInfo . getTableName ( ) , false ) ; alterColumnTypeQuery . append ( " ALTER " ) ; translator . ensureCase ( alterColumnTypeQuery , column . getColumnName ( ) , false ) ; alterColumnTypeQuery . append ( " TYPE " + translator . getCQLType ( CassandraValidationClassMapper . getValidationClass ( column . getType ( ) , isCql3Enabled ( tableInfo ) ) ) ) ; cassandra_client . execute_cql3_query ( ByteBuffer . wrap ( alterColumnTypeQuery . toString ( ) . getBytes ( ) ) , Compression . NONE , ConsistencyLevel . ONE ) ; KunderaCoreUtils . printQuery ( alterColumnTypeQuery . toString ( ) , showQuery ) ; }
showSchema Alters column type of an existing column .