<commit_before>/*
 * Copyright 2015 Cloudius Systems
 */

#include <boost/range/irange.hpp>
#include "cql3/query_processor.hh"
#include "cql3/query_options.hh"
#include "core/distributed.hh"
#include "tests/test-utils.hh"
#include "tests/urchin/cql_test_env.hh"
#include "tests/urchin/cql_assertions.hh"
#include "to_string.hh"
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>

SEASTAR_TEST_CASE(test_create_keyspace_statement) {
    return do_with_cql_env([] (auto& e) {
        return e.execute_cql("create keyspace ks with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };").discard_result();
    });
}

SEASTAR_TEST_CASE(test_create_table_statement) {
    return do_with_cql_env([] (auto& e) {
        return e.execute_cql("create table users (user_name varchar PRIMARY KEY, birth_year bigint);").discard_result();
    });<commit_msg>tests: test cql3 collection type syntax in "create table"<commit_after>/*
 * Copyright 2015 Cloudius Systems
 */

#include <boost/range/irange.hpp>
#include "cql3/query_processor.hh"
#include "cql3/query_options.hh"
#include "core/distributed.hh"
#include "tests/test-utils.hh"
#include "tests/urchin/cql_test_env.hh"
#include "tests/urchin/cql_assertions.hh"
#include "to_string.hh"
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>

SEASTAR_TEST_CASE(test_create_keyspace_statement) {
    return do_with_cql_env([] (auto& e) {
        return e.execute_cql("create keyspace ks with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };").discard_result();
    });
}

SEASTAR_TEST_CASE(test_create_table_statement) {
    return do_with_cql_env([] (auto& e) {
        return e.execute_cql("create table users (user_name varchar PRIMARY KEY, birth_year bigint);").discard_result().then([&e] {
            return e.execute_cql("create table cf (id int primary key, m map<int, int>, s set<text>, l list<uuid>);").discard_result();
        });
    });
{'fraction_non_alphanumeric': 0.14358193810248604, 'fraction_numerical': 0.0076103500761035, 'mean_word_length': 5.1433021806853585, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2111595', 'n_tokens_mistral': 708, 'n_tokens_neox': 687, 'n_words': 135}