diff --git a/cql3/attributes.hh b/cql3/attributes.hh index 8f54caf092..c7be67ac78 100644 --- a/cql3/attributes.hh +++ b/cql3/attributes.hh @@ -78,7 +78,7 @@ public: } catch (exceptions::marshal_exception e) { throw exceptions::invalid_request_exception("Invalid timestamp value"); } - return boost::any_cast(data_type_for()->compose(*tval)); + return boost::any_cast(data_type_for()->deserialize(*tval)); } int32_t get_time_to_live(const query_options& options) { @@ -97,7 +97,7 @@ public: throw exceptions::invalid_request_exception("Invalid TTL value"); } - auto ttl = boost::any_cast(data_type_for()->compose(*tval)); + auto ttl = boost::any_cast(data_type_for()->deserialize(*tval)); if (ttl < 0) { throw exceptions::invalid_request_exception("A TTL must be greater or equal to 0"); } diff --git a/cql3/functions/aggregate_fcts.hh b/cql3/functions/aggregate_fcts.hh index 3d504a832f..eafb6a02a5 100644 --- a/cql3/functions/aggregate_fcts.hh +++ b/cql3/functions/aggregate_fcts.hh @@ -73,7 +73,7 @@ public: if (!values[0]) { return; } - _sum += boost::any_cast(data_type_for()->compose(*values[0])); + _sum += boost::any_cast(data_type_for()->deserialize(*values[0])); } }; @@ -115,7 +115,7 @@ public: return; } ++_count; - _sum += boost::any_cast(data_type_for()->compose(*values[0])); + _sum += boost::any_cast(data_type_for()->deserialize(*values[0])); } }; @@ -152,7 +152,7 @@ public: if (!values[0]) { return; } - auto val = boost::any_cast(data_type_for()->compose(*values[0])); + auto val = boost::any_cast(data_type_for()->deserialize(*values[0])); if (!_max) { _max = val; } else { @@ -199,7 +199,7 @@ public: if (!values[0]) { return; } - auto val = boost::any_cast(data_type_for()->compose(*values[0])); + auto val = boost::any_cast(data_type_for()->deserialize(*values[0])); if (!_min) { _min = val; } else { diff --git a/cql3/functions/time_uuid_fcts.hh b/cql3/functions/time_uuid_fcts.hh index b6b1aea622..a59205a22f 100644 --- a/cql3/functions/time_uuid_fcts.hh +++ b/cql3/functions/time_uuid_fcts.hh @@ -53,7 +53,7 @@ make_min_timeuuid_fct() { if (!bb) { return {}; } - auto ts_obj = timestamp_type->compose(*bb); + auto ts_obj = timestamp_type->deserialize(*bb); if (ts_obj.empty()) { return {}; } @@ -73,7 +73,7 @@ make_max_timeuuid_fct() { if (!bb) { return {}; } - auto ts_obj = timestamp_type->compose(*bb); + auto ts_obj = timestamp_type->deserialize(*bb); if (ts_obj.empty()) { return {}; } diff --git a/tests/urchin/types_test.cc b/tests/urchin/types_test.cc index 54f95b4c7c..16a88cdd38 100644 --- a/tests/urchin/types_test.cc +++ b/tests/urchin/types_test.cc @@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(test_tuple) { return t->decompose(v); }; auto bytes_to_native = [t] (bytes v) { - return boost::any_cast(t->compose(v)); + return boost::any_cast(t->deserialize(v)); }; auto c_to_bytes = [=] (c_type v) { return native_to_bytes(c_to_native(v)); diff --git a/types.cc b/types.cc index 0603bc54bd..1e659db8f3 100644 --- a/types.cc +++ b/types.cc @@ -1618,7 +1618,7 @@ tuple_type_impl::make_name(const std::vector& types) { sstring user_type_impl::get_name_as_string() const { - return boost::any_cast(utf8_type->compose(_name)); + return boost::any_cast(utf8_type->deserialize(_name)); } shared_ptr diff --git a/types.hh b/types.hh index 677282f124..3265dbdafe 100644 --- a/types.hh +++ b/types.hh @@ -268,12 +268,6 @@ protected: return is_compatible_with(other); } public: - virtual boost::any compose(const bytes& v) const { - return deserialize(v); - } - data_value compose_value(const bytes& v) const { - return deserialize_value(v); - } bytes decompose(const boost::any& value) const { bytes b(bytes::initialized_later(), serialized_size(value)); auto i = b.begin();