From ba202cd8bdcfd8c6f1dbb280f642f5ad31cbca7c Mon Sep 17 00:00:00 2001 From: Jan Ciolek Date: Thu, 28 Oct 2021 20:42:43 +0200 Subject: [PATCH] cql3: Use internal cql format in insert_prepared_json_statement cache expr::constant is always serialized using the internal cql serialization format, but currently the code keeps values in the cache in other format. As preparation for moving from term to expression change so that values kept in the cache are serialized using the internal format. Signed-off-by: Jan Ciolek --- cql3/statements/update_statement.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cql3/statements/update_statement.cc b/cql3/statements/update_statement.cc index 6e0bc33150..f66d220fae 100644 --- a/cql3/statements/update_statement.cc +++ b/cql3/statements/update_statement.cc @@ -181,7 +181,7 @@ void update_statement::add_update_for_key(mutation& m, const query::clustering_r modification_statement::json_cache_opt insert_prepared_json_statement::maybe_prepare_json_cache(const query_options& options) const { sstring json_string = utf8_type->to_string(to_bytes(expr::evaluate_to_raw_view(_term, options))); - return json_helpers::parse(std::move(json_string), s->all_columns(), options.get_cql_serialization_format()); + return json_helpers::parse(std::move(json_string), s->all_columns(), cql_serialization_format::internal()); } void @@ -212,7 +212,7 @@ insert_prepared_json_statement::execute_set_value(mutation& m, const clustering_ return; } - cql_serialization_format sf = params._options.get_cql_serialization_format(); + cql_serialization_format sf = cql_serialization_format::internal(); visit(*column.type, make_visitor( [&] (const list_type_impl& ltype) { auto val = ::make_shared(lists::value::from_serialized(raw_value_view::make_value(*value), ltype, sf));