diff options
author | Alexander Smirnov <alex@ydb.tech> | 2025-02-11 00:51:38 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2025-02-11 00:51:38 +0000 |
commit | 1c380be4486e3fbc7209069d5cb04ebb2eb179ac (patch) | |
tree | 7460a5e24909c32fd88b8c8cd94d2548d26401e4 /yql/essentials/sql/v1/format/sql_format.cpp | |
parent | 1b5d9e2ff1d57aaa4d1d784c37756d92331e5dc2 (diff) | |
parent | 098dbd39a7651dcc945ab33e751fdf93cc87c914 (diff) | |
download | ydb-1c380be4486e3fbc7209069d5cb04ebb2eb179ac.tar.gz |
Merge branch 'rightlib' into merge-libs-250211-0050
Diffstat (limited to 'yql/essentials/sql/v1/format/sql_format.cpp')
-rw-r--r-- | yql/essentials/sql/v1/format/sql_format.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/yql/essentials/sql/v1/format/sql_format.cpp b/yql/essentials/sql/v1/format/sql_format.cpp index 0ede01dd8f..c531d24977 100644 --- a/yql/essentials/sql/v1/format/sql_format.cpp +++ b/yql/essentials/sql/v1/format/sql_format.cpp @@ -3071,7 +3071,7 @@ public: } if (mode == EFormatMode::Obfuscate) { - auto message = NSQLTranslationV1::SqlAST(query, "Query", issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS, parsedSettings.AnsiLexer, parsedSettings.Antlr4Parser, parsedSettings.TestAntlr4, parsedSettings.Arena); + auto message = NSQLTranslationV1::SqlAST(query, parsedSettings.File, issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS, parsedSettings.AnsiLexer, parsedSettings.Antlr4Parser, parsedSettings.TestAntlr4, parsedSettings.Arena); if (!message) { return false; } @@ -3082,7 +3082,7 @@ public: auto lexer = NSQLTranslationV1::MakeLexer(parsedSettings.AnsiLexer, parsedSettings.Antlr4Parser); TVector<TString> statements; - if (!NSQLTranslationV1::SplitQueryToStatements(query, lexer, statements, issues)) { + if (!NSQLTranslationV1::SplitQueryToStatements(query, lexer, statements, issues, parsedSettings.File)) { return false; } @@ -3101,12 +3101,12 @@ public: } }; - if (!lexer->Tokenize(currentQuery, "Query", onNextRawToken, issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS)) { + if (!lexer->Tokenize(currentQuery, parsedSettings.File, onNextRawToken, issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS)) { return false; } NYql::TIssues parserIssues; - auto message = NSQLTranslationV1::SqlAST(currentQuery, "Query", parserIssues, NSQLTranslation::SQL_MAX_PARSER_ERRORS, parsedSettings.AnsiLexer, parsedSettings.Antlr4Parser, parsedSettings.TestAntlr4, parsedSettings.Arena); + auto message = NSQLTranslationV1::SqlAST(currentQuery, parsedSettings.File, parserIssues, NSQLTranslation::SQL_MAX_PARSER_ERRORS, parsedSettings.AnsiLexer, parsedSettings.Antlr4Parser, parsedSettings.TestAntlr4, parsedSettings.Arena); if (!message) { finalFormattedQuery << currentQuery; if (!currentQuery.EndsWith("\n")) { @@ -3127,7 +3127,7 @@ public: stmtFormattedTokens.push_back(token); }; - if (!lexer->Tokenize(currentFormattedQuery, "Query", onNextFormattedToken, issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS)) { + if (!lexer->Tokenize(currentFormattedQuery, parsedSettings.File, onNextFormattedToken, issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS)) { return false; } @@ -3178,7 +3178,7 @@ TString MutateQuery(const TString& query, const NSQLTranslation::TTranslationSet } }; - if (!lexer->Tokenize(query, "Query", onNextToken, issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS)) { + if (!lexer->Tokenize(query, parsedSettings.File, onNextToken, issues, NSQLTranslation::SQL_MAX_PARSER_ERRORS)) { throw yexception() << issues.ToString(); } |