Skip to content

Commit

Permalink
Fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Feb 27, 2024
1 parent 0463b64 commit 6eec3ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ydb/core/kqp/host/kqp_translate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ TVector<TQueryAst> ParseStatements(NYql::EKikimrQueryType queryType, const TMayb
std::shared_ptr<std::map<TString, Ydb::Type>> queryParameters, bool sqlAutoCommit,
TMaybe<ui16>& sqlVersion, TString cluster, TString kqpTablePathPrefix,
ui16 kqpYqlSyntaxVersion, NSQLTranslation::EBindingsMode bindingsMode, bool isEnableExternalDataSources,
NYql::TExprContext& ctx, bool isEnablePgConstsToParams, bool isSql) {
NYql::TExprContext& ctx, bool isEnablePgConstsToParams, bool isSql, const THashMap<TString, TString>& clusterMapping) {

TVector<TQueryAst> result;
NYql::TAstParseResult astRes;
if (isSql) {
auto settings = GetTranslationSettings(queryType, usePgParser, sqlAutoCommit, queryText, queryParameters, sqlVersion, cluster, kqpTablePathPrefix, kqpYqlSyntaxVersion, bindingsMode, isEnableExternalDataSources, ctx, isEnablePgConstsToParams);
auto settings = GetTranslationSettings(queryType, usePgParser, sqlAutoCommit, queryText, queryParameters, sqlVersion, cluster, kqpTablePathPrefix, kqpYqlSyntaxVersion, bindingsMode, isEnableExternalDataSources, ctx, isEnablePgConstsToParams, clusterMapping);
ui16 actualSyntaxVersion = 0;
auto astStatements = NSQLTranslation::SqlToAstStatements(queryText, settings, nullptr, &actualSyntaxVersion);
sqlVersion = actualSyntaxVersion;
Expand All @@ -232,9 +232,9 @@ TVector<TQueryAst> ParseStatements(NYql::EKikimrQueryType queryType, const TMayb

TVector<TQueryAst> ParseStatements(NYql::EKikimrQueryType queryType, const TMaybe<Ydb::Query::Syntax>& syntax, const TString& queryText, std::shared_ptr<std::map<TString, Ydb::Type>> queryParameters,
TString cluster, TString kqpTablePathPrefix, ui16 kqpYqlSyntaxVersion, NSQLTranslation::EBindingsMode bindingsMode, bool isEnableExternalDataSources, bool isEnablePgConstsToParams, bool isSql,
bool perStatementExecution) {
bool perStatementExecution, const THashMap<TString, TString>& clusterMapping) {
if (!perStatementExecution) {
return {ParseQuery(queryType, syntax, queryText, queryParameters, isSql, cluster, kqpTablePathPrefix, kqpYqlSyntaxVersion, bindingsMode, isEnableExternalDataSources, isEnablePgConstsToParams)};
return {ParseQuery(queryType, syntax, queryText, queryParameters, isSql, cluster, kqpTablePathPrefix, kqpYqlSyntaxVersion, bindingsMode, isEnableExternalDataSources, isEnablePgConstsToParams, clusterMapping)};
}
TMaybe<ui16> sqlVersion;
TMaybe<bool> usePgParser;
Expand All @@ -257,7 +257,7 @@ TVector<TQueryAst> ParseStatements(NYql::EKikimrQueryType queryType, const TMayb
} else {
sqlAutoCommit = false;
}
return ParseStatements(queryType, usePgParser, queryText, queryParameters, sqlAutoCommit, sqlVersion, cluster, kqpTablePathPrefix, kqpYqlSyntaxVersion, bindingsMode, isEnableExternalDataSources, ctx, isEnablePgConstsToParams, isSql);
return ParseStatements(queryType, usePgParser, queryText, queryParameters, sqlAutoCommit, sqlVersion, cluster, kqpTablePathPrefix, kqpYqlSyntaxVersion, bindingsMode, isEnableExternalDataSources, ctx, isEnablePgConstsToParams, isSql, clusterMapping);
}

} // namespace NKqp
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/kqp/host/kqp_translate.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ TQueryAst ParseQuery(NYql::EKikimrQueryType queryType, const TMaybe<Ydb::Query::
ui16 kqpYqlSyntaxVersion, NSQLTranslation::EBindingsMode bindingsMode, bool isEnableExternalDataSources, bool isEnablePgConstsToParams, const THashMap<TString, TString>& clusterMapping);

TVector<TQueryAst> ParseStatements(NYql::EKikimrQueryType queryType, const TMaybe<Ydb::Query::Syntax>& syntax, const TString& queryText, std::shared_ptr<std::map<TString, Ydb::Type>> queryParameters,
TString cluster, TString kqpTablePathPrefix, ui16 kqpYqlSyntaxVersion, NSQLTranslation::EBindingsMode bindingsMode, bool isEnableExternalDataSources, bool isEnablePgConstsToParams, bool isSql, bool perStatementExecution);
TString cluster, TString kqpTablePathPrefix, ui16 kqpYqlSyntaxVersion, NSQLTranslation::EBindingsMode bindingsMode, bool isEnableExternalDataSources, bool isEnablePgConstsToParams, bool isSql, bool perStatementExecution,
const THashMap<TString, TString>& clusterMapping);

} // namespace NKqp
} // namespace NKikimr

0 comments on commit 6eec3ef

Please sign in to comment.