cql_repl: register schema extensions

Alternator and CDC, apart from enabling their experimental features,
need to have their schema extensions registered. This patch adds missing
registration of schema extensions to cql_repl, so that cql tests written
with Alternator or CDC in mind will properly work.
This commit is contained in:
Piotr Dulikowski
2020-03-06 08:39:21 +01:00
parent 30d2826358
commit 75284eb2a5

View File

@@ -37,6 +37,8 @@
#include "cql3/cql_config.hh"
#include "cql3/type_json.hh"
#include "test/lib/exception_utils.hh"
#include "alternator/tags_extension.hh"
#include "cdc/cdc_extension.hh"
static std::ofstream std_cout;
@@ -113,7 +115,10 @@ std::unique_ptr<cql3::query_options> repl_options() {
// Read-evaluate-print-loop for CQL
void repl(seastar::app_template& app) {
auto db_cfg = make_shared<db::config>();
auto ext = std::make_shared<db::extensions>();
ext->add_schema_extension<alternator::tags_extension>(alternator::tags_extension::NAME);
ext->add_schema_extension<cdc::cdc_extension>(cdc::cdc_extension::NAME);
auto db_cfg = ::make_shared<db::config>(std::move(ext));
db_cfg->enable_user_defined_functions({true}, db::config::config_source::CommandLine);
db_cfg->experimental_features(db::experimental_features_t::all(), db::config::config_source::CommandLine);
do_with_cql_env_thread([] (cql_test_env& e) {