go-sstables
go-sstables copied to clipboard
Update super_sstable_reader.go
The contains of the readers already handle the "tombstone" case.
Just a question :
https://github.com/thomasjungblut/go-sstables/blob/d00463f192d4d4126a04a6ac66aa18fd26f44995/sstables/sstable_merger.go#L41
https://github.com/thomasjungblut/go-sstables/blob/d00463f192d4d4126a04a6ac66aa18fd26f44995/sstables/sstable_merger.go#L120
There is two merge method. I don't really understand the difference. And I don't understand the need of the context.
of course. Merge just merges the given iterators into a single file, so it will have duplicated key entries with their respective values.
MergeCompactIterator returns an iterator that merges and runs the reduce function on the same keys, so the iterator always returns a key and all the matching values.
Thanks for the response. But what about the context ?
The context is to understand which sstable the iterator originated from, so you can do selection based on this too, e.g. check out: https://github.com/thomasjungblut/go-sstables/blob/main/sstables/super_sstable_reader.go#L57-L63