1 | #pragma once |
2 | |
3 | #include <unordered_map> |
4 | |
5 | |
6 | namespace DB |
7 | { |
8 | |
9 | class Block; |
10 | class Context; |
11 | class NamesAndTypesList; |
12 | struct ColumnDefault; |
13 | |
14 | /** Adds three types of columns into block |
15 | * 1. Columns, that are missed inside request, but present in table without defaults (missed columns) |
16 | * 2. Columns, that are missed inside request, but present in table with defaults (columns with default values) |
17 | * 3. Columns that materialized from other columns (materialized columns) |
18 | * All three types of columns are materialized (not constants). |
19 | */ |
20 | Block addMissingDefaults( |
21 | const Block & block, |
22 | const NamesAndTypesList & required_columns, |
23 | const std::unordered_map<std::string, ColumnDefault> & column_defaults, |
24 | const Context & context); |
25 | |
26 | } |
27 | |