Skip to content

Commit e4c6d6e

Browse files
denis0x0Ddorooleg
authored andcommitted
[KQP Constant folding] Add folding for expressions inside AsStruct (#19777)
1 parent b62d162 commit e4c6d6e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ydb/core/kqp/opt/kqp_constant_folding_transformer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ namespace {
3939
return;
4040
}
4141

42+
if (TCoAsStruct::Match(input.Get())) {
43+
for (auto child : TExprBase(input).Cast<TCoAsStruct>()) {
44+
ExtractConstantExprs(child.Item(1).Ptr(), replaces, ctx);
45+
}
46+
return;
47+
}
48+
4249
if (input->IsCallable() && input->Content() != "EvaluateExpr") {
4350
if (input->ChildrenSize() >= 1) {
4451
for (size_t i = 0; i < input->ChildrenSize(); i++) {

ydb/core/kqp/ut/olap/kqp_olap_ut.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3889,7 +3889,6 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
38893889
}
38903890

38913891
Y_UNIT_TEST(GroupByWithMakeDatetime) {
3892-
return; // TODO: fix me
38933892
auto settings = TKikimrSettings()
38943893
.SetWithSampleTables(false);
38953894
TKikimrRunner kikimr(settings);

0 commit comments

Comments
 (0)