Multiframe only expects size of frame instead of default frame

This commit is contained in:
jeremy 2022-11-30 16:00:24 +01:00
parent 072bc58b1e
commit deb31e4b77
3 changed files with 6 additions and 7 deletions

View File

@ -688,7 +688,7 @@ PullPlan::PullPlan(const std::shared_ptr<CachedPlan> plan, const Parameters &par
: plan_(plan),
cursor_(plan->plan().MakeCursor(execution_memory)),
frame_(plan->symbol_table().max_position(), execution_memory),
multi_frame_(frame_, kNumberOfFramesInMultiframe, execution_memory),
multi_frame_(plan->symbol_table().max_position(), kNumberOfFramesInMultiframe, execution_memory),
memory_limit_(memory_limit) {
ctx_.db_accessor = dba;
ctx_.symbol_table = plan->symbol_table();

View File

@ -26,12 +26,11 @@ namespace memgraph::query::v2 {
// static_assert(std::forward_iterator<InvalidFramesPopulator::Iterator> &&
// std::equality_comparable<InvalidFramesPopulator::Iterator>);
MultiFrame::MultiFrame(FrameWithValidity default_frame, size_t number_of_frames,
utils::MemoryResource *execution_memory)
: default_frame_(default_frame),
frames_(utils::pmr::vector<FrameWithValidity>(number_of_frames, default_frame, execution_memory)) {
MultiFrame::MultiFrame(size_t size_of_frame, size_t number_of_frames, utils::MemoryResource *execution_memory)
: default_frame_(FrameWithValidity(size_of_frame, execution_memory)),
frames_(utils::pmr::vector<FrameWithValidity>(number_of_frames, default_frame_, execution_memory)) {
MG_ASSERT(number_of_frames > 0);
MG_ASSERT(!default_frame.IsValid());
MG_ASSERT(!default_frame_.IsValid());
}
MultiFrame::MultiFrame(const MultiFrame &other) : default_frame_(other.default_frame_) {

View File

@ -30,7 +30,7 @@ class MultiFrame {
friend class ValidFramesReader;
friend class InvalidFramesPopulator;
MultiFrame(FrameWithValidity default_frame, size_t number_of_frames, utils::MemoryResource *execution_memory);
MultiFrame(size_t size_of_frame, size_t number_of_frames, utils::MemoryResource *execution_memory);
~MultiFrame() = default;
MultiFrame(const MultiFrame &other); // copy constructor