mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
35 lines
761 B
C++
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;
|
|
};
|
|
|
|
}
|