Row marker can be in one of three states: missing, live (possibly
expiring) or dead. Since it basically behaves like a normal cell, except
it doesn't have any value, row_marker class provides an interface
similar to atomic_cell.
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
Prepares the partition to be returned in a mutation query:
- throws out data which doesn't belong to row_ranges
- expires cells based on query_time
- drops cells covered by higher-level tombstones (compaction)
- leaves at most row_limit live rows
Until we have a fine-grained reader, it's best to perform these on an
existing object. Later we can do it on-the-fly. Based on Origin's
org.apache.cassandra.db.filter.SliceQueryFilter#collectReducedColumns
Reduces coupling. User's should not rely on the fact that it's an
std::map<>. It also allows us to extend row's interface with
domain-specific methods, which are a lot easier to discover than free
functions.
If method doesn't want to share schema ownership it doesn't have to
take it by shared pointer. The benefit is that it's slightly cheaper
and those methods may now be called from places which don't own
schema.
Ensure that read-side accessors are const. This is important in preparation
for multiple memtables (and later, sstables) since a read-side
mutation_partition may be a temporary object coming from multiple memtables
(and sstables) while a write-side mutation_partition is guaranteed to belong
to a single memtable (and thus, not be temporary).
Since writers will want non-const mutation_partitions to write to, they won't
be able to use the read-side accessors by accident.
tombstone from mutation partition is also used for static row purposes,
but under the hood, it's the partition tombstone.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>