From 65a2c68df2d2c350ed37d9264e545de2d3663c07 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 22 Mar 2015 12:38:09 +0200 Subject: [PATCH] cql3: fix update_parameters prefetched rows type We may be required to work on multiple rows (IN (row_key_1, row_key_2)) so use a query::result for prefetched rows. --- cql3/update_parameters.hh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cql3/update_parameters.hh b/cql3/update_parameters.hh index 9ecc312841..db5d9a0e44 100644 --- a/cql3/update_parameters.hh +++ b/cql3/update_parameters.hh @@ -35,8 +35,12 @@ namespace cql3 { */ class update_parameters final { public: - using prefetched_rows_type = std::experimental::optional< - std::unordered_map>; + struct prefetch_data { + query::partition_slice slice; + query::result result; + }; + // Note: value (mutation) only required to contain the rows we are interested in + using prefetched_rows_type = std::experimental::optional; private: const gc_clock::duration _ttl; const prefetched_rows_type _prefetched; // For operation that require a read-before-write