cql3: Fix references to obsolete collection types

The code was using the wrong version of list_type_impl and
collection_type_impl.
This commit is contained in:
Tomasz Grabiec
2015-04-17 14:46:38 +02:00
parent 1aaa8c2f13
commit d87fbe9eb8
3 changed files with 8 additions and 9 deletions

View File

@@ -37,10 +37,12 @@ namespace cql3 {
if (receiver_type == nullptr) {
return ::make_shared<constants::marker>(_bind_index, receiver);
}
switch (receiver_type->kind) {
case db::marshal::collection_type::collection_kind::LIST: return ::make_shared<lists::marker>(_bind_index, receiver);
case db::marshal::collection_type::collection_kind::SET: return ::make_shared<sets::marker>(_bind_index, receiver);
case db::marshal::collection_type::collection_kind::MAP: return ::make_shared<maps::marker>(_bind_index, receiver);
if (&receiver_type->_kind == &collection_type_impl::kind::list) {
return ::make_shared<lists::marker>(_bind_index, receiver);
} else if (&receiver_type->_kind == &collection_type_impl::kind::set) {
return ::make_shared<sets::marker>(_bind_index, receiver);
} else if (&receiver_type->_kind == &collection_type_impl::kind::map) {
return ::make_shared<maps::marker>(_bind_index, receiver);
}
assert(0);
}

View File

@@ -29,9 +29,6 @@
#include "cql3/column_specification.hh"
#include "cql3/term.hh"
#include "db/marshal/collection_type.hh"
#include "db/marshal/list_type.hh"
namespace cql3 {
/**
@@ -94,7 +91,7 @@ public:
private:
static ::shared_ptr<column_specification> make_in_receiver(::shared_ptr<column_specification> receiver) {
auto in_name = ::make_shared<column_identifier>(sstring("in(") + receiver->name->to_string() + sstring(")"), true);
return ::make_shared<column_specification>(receiver->ks_name, receiver->cf_name, in_name, db::marshal::list_type::get_instance(receiver->type, false));
return ::make_shared<column_specification>(receiver->ks_name, receiver->cf_name, in_name, list_type_impl::get_instance(receiver->type, false));
}
public:

View File

@@ -320,7 +320,7 @@ function_call::contains_bind_marker() const {
shared_ptr<terminal>
function_call::make_terminal(shared_ptr<function> fun, bytes_opt result, serialization_format sf) {
if (!dynamic_pointer_cast<shared_ptr<db::marshal::collection_type>>(fun->return_type())) {
if (!dynamic_pointer_cast<collection_type_impl>(fun->return_type())) {
return ::make_shared<constants::value>(std::move(result));
}