ClickHouse/src/Interpreters/inplaceBlockConversions.h

32 lines
810 B
C++
Raw Normal View History

#pragma once
#include <Interpreters/Context_fwd.h>
2021-02-09 08:37:55 +00:00
#include <memory>
#include <string>
#include <unordered_map>
2016-01-13 00:32:59 +00:00
namespace DB
{
2016-01-13 00:32:59 +00:00
class Block;
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.
2021-02-10 19:32:34 +00:00
/// Return nullptr if no actions required.
2021-02-05 15:11:26 +00:00
ActionsDAGPtr evaluateMissingDefaults(
const Block & header,
const NamesAndTypesList & required_columns,
2020-10-02 12:38:50 +00:00
const ColumnsDescription & columns,
ContextPtr context, bool save_unneeded_columns = true);
2020-02-13 20:09:48 +00:00
/// Tries to convert columns in block to required_columns
void performRequiredConversions(Block & block, const NamesAndTypesList & required_columns, ContextPtr context);
}