-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimize memory footprint of CS schemas (#12593)
- Loading branch information
Showing
25 changed files
with
378 additions
and
200 deletions.
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
ydb/core/tx/columnshard/engines/scheme/abstract/column_ids.cpp
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,3 @@ | ||
#include "column_ids.h" | ||
|
||
namespace NKikimr::NOlap {} |
48 changes: 48 additions & 0 deletions
48
ydb/core/tx/columnshard/engines/scheme/abstract/column_ids.h
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 <ydb/library/actors/core/log.h> | ||
#include <ydb/library/formats/arrow/common/iterator.h> | ||
|
||
#include <util/generic/noncopyable.h> | ||
#include <util/system/types.h> | ||
|
||
#include <span> | ||
|
||
namespace NKikimr::NOlap { | ||
|
||
class TColumnIdsView: private TNonCopyable { | ||
private: | ||
std::span<const ui32> ColumnIds; | ||
|
||
class TIterator: public NArrow::NUtil::TRandomAccessIteratorClone<std::span<const ui32>::iterator, TIterator> { | ||
using TBase = NArrow::NUtil::TRandomAccessIteratorClone<std::span<const ui32>::iterator, TIterator>; | ||
|
||
public: | ||
using TBase::TRandomAccessIteratorClone; | ||
}; | ||
|
||
public: | ||
template <typename It> | ||
TColumnIdsView(const It begin, const It end) | ||
: ColumnIds(begin, end) { | ||
} | ||
|
||
TIterator begin() const { | ||
return ColumnIds.begin(); | ||
} | ||
|
||
TIterator end() const { | ||
return ColumnIds.end(); | ||
} | ||
|
||
ui32 operator[](size_t idx) const { | ||
AFL_VERIFY(idx < ColumnIds.size())("idx", idx)("size", ColumnIds.size()); | ||
return ColumnIds[idx]; | ||
} | ||
|
||
ui64 size() const { | ||
return ColumnIds.size(); | ||
} | ||
}; | ||
|
||
} // namespace NKikimr::NOlap |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ LIBRARY() | |
|
||
SRCS( | ||
index_info.cpp | ||
column_ids.cpp | ||
) | ||
|
||
PEERDIR( | ||
|
Oops, something went wrong.