Skip to content

Commit 6424ed6

Browse files
committed
Enable subqueries inside view queries
1 parent 7c4c809 commit 6424ed6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ydb/library/yql/sql/v1/sql_translation.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ TNodePtr BuildViewSelect(
9090
}
9191
issues.Clear();
9292

93+
// Holds (among other things) subquery references.
94+
// These references need to be passed to the parent context
95+
// to be able to compile view queries with subqueries.
96+
context.PushCurrentBlocks(&parentContext.GetCurrentBlocks());
97+
9398
context.Settings.Mode = NSQLTranslation::ESqlMode::LIMITED_VIEW;
9499

95100
TSqlSelect selectTranslator(context, context.Settings.Mode);

0 commit comments

Comments
 (0)