db: Do not fail when creating a table with composite partition key

This commit is contained in:
Tomasz Grabiec
2015-03-10 09:40:00 +01:00
parent b9d6cbeb3b
commit fc00cf4f0f
3 changed files with 3 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ schema::schema(sstring ks_name, sstring cf_name, std::vector<column> partition_k
thrift.partition_key_type = partition_key[0].type;
} else {
// TODO: the type should be composite_type
throw std::runtime_error("not implemented");
warn(unimplemented::cause::LEGACY_COMPOSITE_KEYS);
}
build_columns(partition_key, column_definition::column_kind::PARTITION, _partition_key);

View File

@@ -25,6 +25,7 @@ std::ostream& operator<<(std::ostream& out, cause c) {
case cause::COMPACT_TABLES: return out << "COMPACT_TABLES";
case cause::GOSSIP: return out << "GOSSIP";
case cause::TOKEN_RESTRICTION: return out << "TOKEN_RESTRICTION";
case cause::LEGACY_COMPOSITE_KEYS: return out << "LEGACY_COMPOSITE_KEYS";
}
assert(0);
}

View File

@@ -24,6 +24,7 @@ enum class cause {
COMPACT_TABLES,
GOSSIP,
TOKEN_RESTRICTION,
LEGACY_COMPOSITE_KEYS,
};
void fail(cause what) __attribute__((noreturn));