aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/clickhouse/client/columns/tuple.h
blob: d388a7b9a93ff59ab0f7d23d551dfd3cd1f47c3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once

#include "column.h"

#include <util/generic/vector.h>

namespace NClickHouse {
    /** */
    class TColumnTuple: public TColumn {
    public:
        static TIntrusivePtr<TColumnTuple> Create(const TVector<TColumnRef>& columns);

        TColumnRef operator[](size_t n) const {
            return Columns_[n];
        }

        /// Appends content of given column to the end of current one.
        void Append(TColumnRef) override {
        }

        size_t Size() const override;

        bool Load(TCodedInputStream* input, size_t rows) override;

        void Save(TCodedOutputStream* output) override;

        TColumnRef Slice(size_t, size_t) override {
            return TColumnRef();
        }

    private:
        TColumnTuple(const TVector<TColumnRef>& columns);

        TVector<TColumnRef> Columns_;
    };

}