ClickHouse/src/Interpreters/inplaceBlockConversions.h

30 lines
742 B
C++
Raw Normal View History

#pragma once
2016-01-13 00:32:59 +00:00
#include <unordered_map>
#include <string>
2016-01-13 00:32:59 +00:00
namespace DB
{
2016-01-13 00:32:59 +00:00
class Block;
class Context;
class NamesAndTypesList;
2020-10-02 12:38:50 +00:00
class ColumnsDescription;
class ActionsDAG;
using ActionsDAGPtr = std::shared_ptr<ActionsDAG>;
2021-02-05 15:11:26 +00:00
/// Create actions which adds missing defaults to block according to required_columns using columns description.
ActionsDAGPtr evaluateMissingDefaults(
const Block & header,
const NamesAndTypesList & required_columns,
2020-10-02 12:38:50 +00:00
const ColumnsDescription & columns,
const Context & context, bool save_unneeded_columns = true);
2020-02-13 20:09:48 +00:00
/// Tries to convert columns in block to required_columns
2020-01-15 13:00:08 +00:00
void performRequiredConversions(Block & block,
const NamesAndTypesList & required_columns,
const Context & context);
}