diff --git a/internal/core/src/segcore/TimestampIndex.cpp b/internal/core/src/segcore/TimestampIndex.cpp index 84653249e7..e08d8a408d 100644 --- a/internal/core/src/segcore/TimestampIndex.cpp +++ b/internal/core/src/segcore/TimestampIndex.cpp @@ -9,13 +9,15 @@ // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License -#include +#include "TimestampIndex.h" namespace milvus::segcore { + void TimestampIndex::set_length_meta(std::vector lengths) { lengths_ = std::move(lengths); } + void TimestampIndex::build_with(const Timestamp* timestamps, int64_t size) { auto num_slice = lengths_.size(); @@ -45,6 +47,7 @@ TimestampIndex::build_with(const Timestamp* timestamps, int64_t size) { this->max_timestamp_ = last_max_v; this->timestamp_barriers_ = std::move(timestamp_barriers); } + std::pair TimestampIndex::get_active_range(Timestamp query_timestamp) const { if (query_timestamp >= max_timestamp_) { @@ -59,6 +62,7 @@ TimestampIndex::get_active_range(Timestamp query_timestamp) const { Assert(0 <= block_id && block_id < lengths_.size()); return {start_locs_[block_id], start_locs_[block_id + 1]}; } + boost::dynamic_bitset<> TimestampIndex::GenerateBitset(Timestamp query_timestamp, std::pair active_range, @@ -101,4 +105,5 @@ GenerateFakeSlices(const Timestamp* timestamps, int64_t size, int min_slice_leng results.push_back(slice_length); return results; } + } // namespace milvus::segcore