From 32c388b48c6044b86932f336ec95b7635c6ea53a Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Tue, 14 May 2019 18:26:51 +0300 Subject: [PATCH] alternator: fix clustering key setup Because of a typo, we incorrectly set the table's sort key as a second partition key column instead of a clustering key column. This has bad but subtle consequences - such as that the items are *not* sorted according to the sort key. So in this patch we fix the typo. Signed-off-by: Nadav Har'El --- alternator/executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alternator/executor.cc b/alternator/executor.cc index eb9ddd1bd2..31b265fe3e 100644 --- a/alternator/executor.cc +++ b/alternator/executor.cc @@ -277,7 +277,7 @@ future executor::create_table(std::string content) { throw api_error("ValidationException", "Second key in KeySchema must be a RANGE key"); } - add_column(builder, key_schema[1]["AttributeName"].asString(), attribute_definitions, column_kind::partition_key); + add_column(builder, key_schema[1]["AttributeName"].asString(), attribute_definitions, column_kind::clustering_key); } builder.with_column(bytes(ATTRS_COLUMN_NAME), attrs_type(), column_kind::regular_column);