Skip to content

Commit

Permalink
add tupleSize Function
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwhj committed Apr 23, 2019
1 parent 69adb8d commit 7c75a6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clickhouse/columns/tuple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ size_t ColumnTuple::Size() const {
return columns_.empty() ? 0 : columns_[0]->Size();
}

size_t ColumnTuple::tupleSize() {
return columns_.empty() ? 0 : columns_.size();
}

bool ColumnTuple::Load(CodedInputStream* input, size_t rows) {
for (auto ci = columns_.begin(); ci != columns_.end(); ++ci) {
if (!(*ci)->Load(input, rows)) {
Expand Down
2 changes: 2 additions & 0 deletions clickhouse/columns/tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class ColumnTuple : public Column {
return columns_[n];
}

size_t tupleSize();

public:
/// Appends content of given column to the end of current one.
void Append(ColumnRef) override { }
Expand Down

0 comments on commit 7c75a6a

Please sign in to comment.