diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-30 09:51:21 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-30 10:08:27 +0300 |
commit | 468826fff1465595d80da778532b253674e1e1c3 (patch) | |
tree | 55979be8d30470ec46d845bb5d2270a11847d186 /contrib/clickhouse/src/Interpreters/MutationsInterpreter.cpp | |
parent | 98ecc8deb38724114150e3758b86eb79dc9f12a9 (diff) | |
download | ydb-468826fff1465595d80da778532b253674e1e1c3.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/clickhouse/src/Interpreters/MutationsInterpreter.cpp')
-rw-r--r-- | contrib/clickhouse/src/Interpreters/MutationsInterpreter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/clickhouse/src/Interpreters/MutationsInterpreter.cpp b/contrib/clickhouse/src/Interpreters/MutationsInterpreter.cpp index e50f8488ca..c8fe0205d5 100644 --- a/contrib/clickhouse/src/Interpreters/MutationsInterpreter.cpp +++ b/contrib/clickhouse/src/Interpreters/MutationsInterpreter.cpp @@ -671,9 +671,15 @@ void MutationsInterpreter::prepare(bool dry_run) { if (column.default_desc.kind == ColumnDefaultKind::Materialized) { + auto type_literal = std::make_shared<ASTLiteral>(column.type->getName()); + + auto materialized_column = makeASTFunction("_CAST", + column.default_desc.expression->clone(), + type_literal); + stages.back().column_to_updated.emplace( column.name, - column.default_desc.expression->clone()); + materialized_column); } } } |