code: private void createOrUpdateColumnFamily(TableInfo tableInfo, KsDef ksDef) throws Exception
      {
          MetaDataHandler handler = new MetaDataHandler();
  
          if (containsCompositeKey(tableInfo))
          {
              validateCompoundKey(tableInfo);
              createOrUpdateUsingCQL3(tableInfo, ksDef);
  
              // After successful schema operation, perform index creation.
              createIndexUsingCql(tableInfo);
          }
          else if (containsCollectionColumns(tableInfo) || isCql3Enabled(tableInfo))
          {
              createOrUpdateUsingCQL3(tableInfo, ksDef);
              createIndexUsingCql(tableInfo);
          }
          else
          {
  
              CfDef cf_def = handler.getTableMetadata(tableInfo);
              try
              {
                  cassandra_client.system_add_column_family(cf_def);
              }
              catch (InvalidRequestException irex)
              {
                  updateExistingColumnFamily(tableInfo, ksDef, irex);
              }
          }
      }
docs: Creates the or update column family.
  
  @param tableInfo
  the table info
  @param ksDef
  the ks def
  @throws Exception
  the exception