From a572d126e4040bc4e289ae629de425dd206c72ab Mon Sep 17 00:00:00 2001 From: Piotr Jastrzebski Date: Thu, 17 May 2018 17:06:13 +0200 Subject: [PATCH] Support all fixed size column types from SSTable 3.x Signed-off-by: Piotr Jastrzebski --- sstables/row.hh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sstables/row.hh b/sstables/row.hh index fb6f5375cc..898f5a6352 100644 --- a/sstables/row.hh +++ b/sstables/row.hh @@ -587,11 +587,9 @@ private: return _column_ids.front(); } std::optional get_column_value_length() { - static const thread_local std::string int32_type_name("org.apache.cassandra.db.marshal.Int32Type"); - if (boost::equal(_column_descs.front().type_name.value, int32_type_name)) { - return uint32_t{4}; - } - return { }; + auto type = abstract_type::parse_type(sstring(std::cbegin(_column_descs.front().type_name.value), + std::cend(_column_descs.front().type_name.value))); + return type->value_length_if_fixed(); } public: using consumer = consumer_m;