ClickHouse/src/Processors/Transforms/AddingDefaultsTransform.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
761 B
C++
Raw Normal View History

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