diff options
author | deminds <deminds@yandex-team.com> | 2025-03-11 13:59:51 +0300 |
---|---|---|
committer | deminds <deminds@yandex-team.com> | 2025-03-11 14:18:49 +0300 |
commit | a524c2bc110ac3ca4cf6547f1f5e41ce28391ebb (patch) | |
tree | 5c0b46c6037608f97182f4a27de4a92f3173e93a /library/cpp/cppparser/parser.cpp | |
parent | 611f4466195f72f44d869385122cad3cfc89a183 (diff) | |
download | ydb-a524c2bc110ac3ca4cf6547f1f5e41ce28391ebb.tar.gz |
view: use parent context for query AST building
Issues:
* <HIDDEN_URL>
* <https://github.com/ydb-platform/ydb/issues/14709>
Previously it was impossible to create a simple view like the following:
```sql
CREATE VIEW demo_view WITH (security_invoker = TRUE) AS
SELECT
"bbb" LIKE Unwrap("aaa")
```
The problem was caused by the fact that a separate parsing context was used to build a view select AST for later validation. The list of UDFs is global for the whole parsing process to optimize the calculations. This global list was lost in the separate context and the view validation failed in such cases.
We fix the issue by using the same context for the view query validation in which the `CREATE VIEW` statement is executed. Moreover, we have started capturing all the statements in the view query text that can affect the compilation (see the `NeedUseForAllStatements` function).
commit_hash:f84d54ff1688fb43af7170a4db35f6729f2c4f10
Diffstat (limited to 'library/cpp/cppparser/parser.cpp')
0 files changed, 0 insertions, 0 deletions