diff --git a/streamed_mutation.cc b/streamed_mutation.cc index 222cfb66c5..3854a1f629 100644 --- a/streamed_mutation.cc +++ b/streamed_mutation.cc @@ -37,6 +37,20 @@ operator<<(std::ostream& os, const static_row& row) { return os << "{static_row: "<< row._cells << "}"; } +std::ostream& operator<<(std::ostream& out, position_in_partition_view pos) { + out << "{position: " << pos._bound_weight << ":"; + if (pos._ck) { + out << *pos._ck; + } else { + out << "null"; + } + return out << "}"; +} + +std::ostream& operator<<(std::ostream& out, const position_in_partition& pos) { + return out << static_cast(pos); +} + mutation_fragment::mutation_fragment(static_row&& r) : _kind(kind::static_row), _data(std::make_unique()) { diff --git a/streamed_mutation.hh b/streamed_mutation.hh index cbf1f74c5d..7179138422 100644 --- a/streamed_mutation.hh +++ b/streamed_mutation.hh @@ -321,6 +321,8 @@ public: : _ck(&ck) { } position_in_partition_view(range_tag_t, bound_view bv) : _bound_weight(weight(bv.kind)), _ck(&bv.prefix) { } + + friend std::ostream& operator<<(std::ostream&, position_in_partition_view); }; class position_in_partition { @@ -438,6 +440,7 @@ public: return compare(a, b); } }; + friend std::ostream& operator<<(std::ostream&, const position_in_partition&); }; inline position_in_partition_view static_row::position() const