ClickHouse/src/Processors/Transforms/AddingDefaultsTransform.h
2021-07-21 19:13:17 +03:00

35 lines
761 B
C++

#pragma once
#include <Processors/ISimpleTransform.h>
#include <Storages/ColumnsDescription.h>
namespace DB
{
class IInputFormat;
/// Adds defaults to columns using BlockDelayedDefaults bitmask attached to Block by child InputStream.
class AddingDefaultsTransform : public ISimpleTransform
{
public:
AddingDefaultsTransform(
const Block & header,
const ColumnsDescription & columns_,
IInputFormat & input_format_,
ContextPtr context_);
String getName() const override { return "AddingDefaultsTransform"; }
protected:
void transform(Chunk & chunk) override;
private:
const ColumnsDescription columns;
const ColumnDefaults column_defaults;
IInputFormat & input_format;
ContextPtr context;
};
}