-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1095 from kuzudb/remove-is-flat
Remove getPositionOfCurrIdx
- Loading branch information
Showing
107 changed files
with
331 additions
and
2,503 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "common/configs.h" | ||
#include "common/types/types.h" | ||
|
||
namespace kuzu { | ||
namespace common { | ||
|
||
class SelectionVector { | ||
public: | ||
explicit SelectionVector(sel_t capacity) : selectedSize{0} { | ||
selectedPositionsBuffer = std::make_unique<sel_t[]>(capacity); | ||
resetSelectorToUnselected(); | ||
} | ||
|
||
inline bool isUnfiltered() const { | ||
return selectedPositions == (sel_t*)&INCREMENTAL_SELECTED_POS; | ||
} | ||
inline void resetSelectorToUnselected() { | ||
selectedPositions = (sel_t*)&INCREMENTAL_SELECTED_POS; | ||
} | ||
inline void resetSelectorToUnselectedWithSize(sel_t size) { | ||
selectedPositions = (sel_t*)&INCREMENTAL_SELECTED_POS; | ||
selectedSize = size; | ||
} | ||
inline void resetSelectorToValuePosBuffer() { | ||
selectedPositions = selectedPositionsBuffer.get(); | ||
} | ||
inline void resetSelectorToValuePosBufferWithSize(sel_t size) { | ||
selectedPositions = selectedPositionsBuffer.get(); | ||
selectedSize = size; | ||
} | ||
inline sel_t* getSelectedPositionsBuffer() { return selectedPositionsBuffer.get(); } | ||
|
||
static const sel_t INCREMENTAL_SELECTED_POS[DEFAULT_VECTOR_CAPACITY]; | ||
|
||
public: | ||
sel_t* selectedPositions; | ||
sel_t selectedSize; | ||
|
||
private: | ||
std::unique_ptr<sel_t[]> selectedPositionsBuffer; | ||
}; | ||
|
||
} // namespace common | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.