mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
27 lines
608 B
C++
27 lines
608 B
C++
#pragma once
|
|
#include <Processors/ISimpleTransform.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Extracts required columns and subcolumns from the block.
|
|
class ExtractColumnsTransform final : public ISimpleTransform
|
|
{
|
|
public:
|
|
ExtractColumnsTransform(
|
|
const Block & header_,
|
|
const NamesAndTypesList & requested_columns_);
|
|
|
|
String getName() const override { return "ExtractColumnsTransform"; }
|
|
|
|
static Block transformHeader(Block header, const NamesAndTypesList & requested_columns_);
|
|
|
|
protected:
|
|
void transform(Chunk & chunk) override;
|
|
|
|
private:
|
|
const NamesAndTypesList requested_columns;
|
|
};
|
|
|
|
}
|