Skip to content

Commit a9a28dd

Browse files
committed
Fixed pragmas for CTAS
1 parent 709b413 commit a9a28dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ydb/core/kqp/host/kqp_statement_rewrite.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ namespace {
278278
create = exprCtx.ReplaceNode(std::move(create), *tableNameNode, exprCtx.NewAtom(pos, tmpTableName));
279279
}
280280

281-
const auto topLevelRead = NYql::FindTopLevelRead(insertData.Ptr());
281+
NYql::TNodeOnNodeOwnedMap deepClones;
282+
auto insertDataCopy = exprCtx.DeepCopy(insertData.Ref(), exprCtx, deepClones, false, false);
283+
const auto topLevelRead = NYql::FindTopLevelRead(insertDataCopy);
282284

283285
NYql::TExprNode::TListType insertSettings;
284286
insertSettings.push_back(
@@ -305,7 +307,7 @@ namespace {
305307
}),
306308
}),
307309
}),
308-
insertData.Ptr(),
310+
insertDataCopy,
309311
exprCtx.NewList(pos, std::move(insertSettings)),
310312
});
311313

0 commit comments

Comments
 (0)