diff options
author | vvvv <vvvv@yandex-team.ru> | 2022-04-20 21:46:13 +0300 |
---|---|---|
committer | vvvv <vvvv@yandex-team.ru> | 2022-04-20 21:46:13 +0300 |
commit | 9dd8fe2ea39368adc2a725356eacb33518fd73f7 (patch) | |
tree | b9ea08ee40501a35d5cc7d391704499a9900f9bb | |
parent | f14dff2f586115904cc939f0deea5264c998db49 (diff) | |
download | ydb-9dd8fe2ea39368adc2a725356eacb33518fd73f7.tar.gz |
YQL-12683 proper handling of AS by scopes, handle VIEW, use generated pb.h instead of reflection where possible, fix comment after minus
ref:4adfc07b1673de94ef66a07dcc81893184a7d9c6
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | ydb/library/yql/sql/v1/context.h | 14 |
2 files changed, 7 insertions, 9 deletions
@@ -34,7 +34,7 @@ List of most significant contributors: Daniil Cherednik <dan.cherednik@gmail.com> Andrey Neporada <neporada@gmail.com> Ilya Enkovich <enkovich@gmail.com> - Andrey Satarin <asatarin@yandex.ru> + Andrey Satarin <andrew.satarin@gmail.com> Vadim Skipin <vadim.skipin@gmail.com> Alexander Soloviev <single@yandex-team.ru> Vasily Gerasimov <UgnineSirdis@gmail.com> diff --git a/ydb/library/yql/sql/v1/context.h b/ydb/library/yql/sql/v1/context.h index 396b95daea..e0228cc2d2 100644 --- a/ydb/library/yql/sql/v1/context.h +++ b/ydb/library/yql/sql/v1/context.h @@ -9,6 +9,8 @@ #include <ydb/library/yql/sql/settings/translation_settings.h> #include <ydb/library/yql/sql/cluster_mapping.h> +#include <ydb/library/yql/parser/proto_ast/gen/v1_proto/SQLv1Parser.pb.h> + #include <util/generic/hash.h> #include <util/generic/map.h> #include <util/generic/maybe.h> @@ -97,15 +99,13 @@ namespace NSQLTranslationV1 { void SetWarningPolicyFor(NYql::TIssueCode code, NYql::EWarningAction action); - template <typename TToken> - const TString& Token(const TToken& token) { + const TString& Token(const NSQLv1Generated::TToken& token) { Position.Row = token.GetLine(); Position.Column = token.GetColumn() + 1; return token.GetValue(); } - template <typename TToken> - TPosition TokenPosition(const TToken& token) { + TPosition TokenPosition(const NSQLv1Generated::TToken& token) { TPosition pos = Position; pos.Row = token.GetLine(); pos.Column = token.GetColumn() + 1; @@ -314,13 +314,11 @@ namespace NSQLTranslationV1 { TContext& Context(); IOutputStream& Error(); - template <typename TToken> - const TString& Token(const TToken& token) { + const TString& Token(const NSQLv1Generated::TToken& token) { return Ctx.Token(token); } - template <typename TToken> - TString Identifier(const TToken& token) { + TString Identifier(const NSQLv1Generated::TToken& token) { return IdContent(Ctx, Token(token)); } |