private void addColumnToTable(TableInfo tableInfo, ColumnInfo column) throws Exception
    {
        CQLTranslator translator = new CQLTranslator();
        StringBuilder addColumnQuery = new StringBuilder("ALTER TABLE ");
        translator.ensureCase(addColumnQuery, tableInfo.getTableName(), false);
        addColumnQuery.append(" ADD ");
        translator.ensureCase(addColumnQuery, column.getColumnName(), false);
        addColumnQuery.append(" "
                + translator.getCQLType(CassandraValidationClassMapper.getValidationClass(column.getType(),
                        isCql3Enabled(tableInfo))));
        try
        {
            KunderaCoreUtils.printQuery(addColumnQuery.toString(), showQuery);
            cassandra_client.execute_cql3_query(ByteBuffer.wrap(addColumnQuery.toString().getBytes()),
                    Compression.NONE, ConsistencyLevel.ONE);
        }
        catch (InvalidRequestException ireforAddColumn)
        {
            StringBuilder ireforAddColumnbBuilder = new StringBuilder("Invalid column name ");
            ireforAddColumnbBuilder.append(column.getColumnName() + " because it conflicts with an existing column");
            if (ireforAddColumn.getWhy() != null && ireforAddColumn.getWhy().equals(ireforAddColumnbBuilder.toString()))
            {
                // alterColumnType(tableInfo, translator, column);
            }
            else
            {
                log.error("Error occurred while altering column type of  table {}, Caused by: .",
                        tableInfo.getTableName(), ireforAddColumn);
                throw new SchemaGenerationException("Error occurred while adding column into table "
                        + tableInfo.getTableName(), ireforAddColumn, "Cassandra", databaseName);
            }
        }

    }
private void addColumnToTable ( TableInfo tableInfo , ColumnInfo column ) throws Exception { CQLTranslator translator = new CQLTranslator ( ) ; StringBuilder addColumnQuery = new StringBuilder ( "ALTER TABLE " ) ; translator . ensureCase ( addColumnQuery , tableInfo . getTableName ( ) , false ) ; addColumnQuery . append ( " ADD " ) ; translator . ensureCase ( addColumnQuery , column . getColumnName ( ) , false ) ; addColumnQuery . append ( " " + translator . getCQLType ( CassandraValidationClassMapper . getValidationClass ( column . getType ( ) , isCql3Enabled ( tableInfo ) ) ) ) ; try { KunderaCoreUtils . printQuery ( addColumnQuery . toString ( ) , showQuery ) ; cassandra_client . execute_cql3_query ( ByteBuffer . wrap ( addColumnQuery . toString ( ) . getBytes ( ) ) , Compression . NONE , ConsistencyLevel . ONE ) ; } catch ( InvalidRequestException ireforAddColumn ) { StringBuilder ireforAddColumnbBuilder = new StringBuilder ( "Invalid column name " ) ; ireforAddColumnbBuilder . append ( column . getColumnName ( ) + " because it conflicts with an existing column" ) ; if ( ireforAddColumn . getWhy ( ) != null && ireforAddColumn . getWhy ( ) . equals ( ireforAddColumnbBuilder . toString ( ) ) ) { } else { log . error ( "Error occurred while altering column type of  table {}, Caused by: ." , tableInfo . getTableName ( ) , ireforAddColumn ) ; throw new SchemaGenerationException ( "Error occurred while adding column into table " + tableInfo . getTableName ( ) , ireforAddColumn , "Cassandra" , databaseName ) ; } } }
Adds column to table if not exists previously i.e. alter table.

@param tableInfo
the table info
@param column
the column
@throws Exception
the exception