tuple.h 841 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "column.h"
  3. #include <util/generic/vector.h>
  4. namespace NClickHouse {
  5. /** */
  6. class TColumnTuple: public TColumn {
  7. public:
  8. static TIntrusivePtr<TColumnTuple> Create(const TVector<TColumnRef>& columns);
  9. TColumnRef operator[](size_t n) const {
  10. return Columns_[n];
  11. }
  12. /// Appends content of given column to the end of current one.
  13. void Append(TColumnRef) override {
  14. }
  15. size_t Size() const override;
  16. bool Load(TCodedInputStream* input, size_t rows) override;
  17. void Save(TCodedOutputStream* output) override;
  18. TColumnRef Slice(size_t, size_t) override {
  19. return TColumnRef();
  20. }
  21. private:
  22. TColumnTuple(const TVector<TColumnRef>& columns);
  23. TVector<TColumnRef> Columns_;
  24. };
  25. }