#pragma once #include #include #include #include #include #include namespace DB { class ColumnPermuteTransform : public ISimpleTransform { public: ColumnPermuteTransform(const Block & header_, const std::vector & permutation_); String getName() const override { return "ColumnPermuteTransform"; } void transform(Chunk & chunk) override; static Block permute(const Block & block, const std::vector & permutation); private: Names column_names; std::vector permutation; }; }