diff --git a/src/include/storage/table/tuple.h b/src/include/storage/table/tuple.h index c8a5b7366..2d44cc0bf 100644 --- a/src/include/storage/table/tuple.h +++ b/src/include/storage/table/tuple.h @@ -99,7 +99,8 @@ class Tuple { auto GetValue(const Schema *schema, uint32_t column_idx) const -> Value; // Generates a key tuple given schemas and attributes - auto KeyFromTuple(const Schema &schema, const Schema &key_schema, const std::vector &key_attrs) -> Tuple; + auto KeyFromTuple(const Schema &schema, const Schema &key_schema, const std::vector &key_attrs) const + -> Tuple; // Is the column value null ? inline auto IsNull(const Schema *schema, uint32_t column_idx) const -> bool { diff --git a/src/storage/table/tuple.cpp b/src/storage/table/tuple.cpp index de36e1c01..e5ea0fa8c 100644 --- a/src/storage/table/tuple.cpp +++ b/src/storage/table/tuple.cpp @@ -68,7 +68,7 @@ auto Tuple::GetValue(const Schema *schema, const uint32_t column_idx) const -> V return Value::DeserializeFrom(data_ptr, column_type); } -auto Tuple::KeyFromTuple(const Schema &schema, const Schema &key_schema, const std::vector &key_attrs) +auto Tuple::KeyFromTuple(const Schema &schema, const Schema &key_schema, const std::vector &key_attrs) const -> Tuple { std::vector values; values.reserve(key_attrs.size());