diff options
author | vityaman <vityaman.dev@yandex.ru> | 2025-04-10 17:08:20 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2025-04-10 17:35:51 +0300 |
commit | 473f2869597653cf26c8582095d1d9a805cb66fb (patch) | |
tree | f6afcec18b8aa4615143870629a54490640c0bdd /yql/essentials/sql/v1/complete/syntax/parser_call_stack.cpp | |
parent | ad6f8c8e4e2fa19203ed9f28d4eb74827e937d3e (diff) | |
download | ydb-473f2869597653cf26c8582095d1d9a805cb66fb.tar.gz |
YQL-19747 Complete read hints on PROCESS and REDUCE
Forgot to support it.
- Related to https://github.com/ydb-platform/ydb/issues/9056
- Related to https://github.com/vityaman/ydb/issues/24
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1195
commit_hash:a2f5937dbca5712f3ecbfccdf66662ce99e70619
Diffstat (limited to 'yql/essentials/sql/v1/complete/syntax/parser_call_stack.cpp')
-rw-r--r-- | yql/essentials/sql/v1/complete/syntax/parser_call_stack.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yql/essentials/sql/v1/complete/syntax/parser_call_stack.cpp b/yql/essentials/sql/v1/complete/syntax/parser_call_stack.cpp index bbe0b3d371c..cdd284b0ad4 100644 --- a/yql/essentials/sql/v1/complete/syntax/parser_call_stack.cpp +++ b/yql/essentials/sql/v1/complete/syntax/parser_call_stack.cpp @@ -44,6 +44,7 @@ namespace NSQLComplete { const TVector<TRuleId> HintNameRules = { RULE(Id_hint), + RULE(An_id), }; TVector<std::string> Symbolized(const TParserCallStack& stack) { @@ -96,12 +97,13 @@ namespace NSQLComplete { } bool IsLikelyHintStack(const TParserCallStack& stack) { - return ContainsRule(RULE(Id_hint), stack); + return ContainsRule(RULE(Id_hint), stack) || + Contains({RULE(External_call_param), RULE(An_id)}, stack); } std::optional<EStatementKind> StatementKindOf(const TParserCallStack& stack) { for (TRuleId rule : std::ranges::views::reverse(stack)) { - if (rule == RULE(Select_core)) { + if (rule == RULE(Process_core) || rule == RULE(Reduce_core) || rule == RULE(Select_core)) { return EStatementKind::Select; } if (rule == RULE(Into_table_stmt)) { |