minor updates.

This commit is contained in:
Amos Bird 2019-07-17 09:24:37 +08:00
parent 503556ae53
commit 71233e11a9
3 changed files with 16 additions and 14 deletions

View File

@ -24,20 +24,6 @@ namespace ErrorCodes
class Arena;
class ColumnGathererStream;
struct ColumnSize
{
size_t marks = 0;
size_t data_compressed = 0;
size_t data_uncompressed = 0;
void add(const ColumnSize & other)
{
marks += other.marks;
data_compressed += other.data_compressed;
data_uncompressed += other.data_uncompressed;
}
};
/// Declares interface to store columns in memory.
class IColumn : public COW<IColumn>
{

View File

@ -38,6 +38,19 @@ class AlterCommands;
class MutationCommands;
class PartitionCommands;
struct ColumnSize
{
size_t marks = 0;
size_t data_compressed = 0;
size_t data_uncompressed = 0;
void add(const ColumnSize & other)
{
marks += other.marks;
data_compressed += other.data_compressed;
data_uncompressed += other.data_uncompressed;
}
};
/** Storage. Describes the table. Responsible for
* - storage of the table data;
@ -82,6 +95,8 @@ public:
/// Returns true if the storage supports deduplication of inserted data blocks.
virtual bool supportsDeduplication() const { return false; }
/// Optional size information of each physical column.
/// Currently it's only used by the MergeTree family for query optimizations.
using ColumnSizeByName = std::unordered_map<std::string, ColumnSize>;
virtual ColumnSizeByName getColumnSizes() const { return {}; }

View File

@ -22,6 +22,7 @@
namespace DB
{
struct ColumnSize;
class MergeTreeData;