Skip to content

Commit 4e4600b

Browse files
nepalmaximyurchuk
authored andcommitted
Merge PR #10741, #10799, #10732
\#10732 Fix a bug in YQL node creation for indexImplTable table settings \#10799support computation graph invalidation in purecalc \#10741Don't use Now() during replay for yt settings commit_hash:bc4c150ceb2ae05fc19eaa4804fb668730a89410
1 parent 111a142 commit 4e4600b

File tree

8 files changed

+17
-14
lines changed

8 files changed

+17
-14
lines changed

yql/essentials/core/extract_predicate/ut/extract_predicate_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ Y_UNIT_TEST_SUITE(TYqlExtractPredicate) {
4444
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
4545
typesCtx = MakeIntrusive<TTypeAnnotationContext>();
4646
typesCtx->RandomProvider = CreateDeterministicRandomProvider(1);
47-
auto ytState = MakeIntrusive<TYtState>();
47+
auto ytState = MakeIntrusive<TYtState>(typesCtx.Get());
4848
ytState->Gateway = ytGateway;
49-
ytState->Types = typesCtx.Get();
5049

5150
InitializeYtGateway(ytGateway, ytState);
5251
typesCtx->AddDataSink(YtProviderName, CreateYtDataSink(ytState));

yql/essentials/core/facade/yql_facade.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ TProgram::TProgram(
312312
QContext_.GetWriter()->Put({FacadeComponent, StaticCredentialsLabel}, credList).GetValueSync();
313313
} else if (QContext_.CanRead()) {
314314
Credentials_ = MakeIntrusive<TCredentials>();
315+
Credentials_->SetUserCredentials({
316+
.OauthToken = "REPLAY_OAUTH",
317+
.BlackboxSessionIdCookie = "REPLAY_SESSIONID"
318+
});
319+
315320
for (const auto& label : {StaticCredentialsLabel, DynamicCredentialsLabel}) {
316321
auto item = QContext_.GetReader()->Get({FacadeComponent, label}).GetValueSync();
317322
if (item) {

yql/essentials/core/ut/yql_expr_constraint_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ Y_UNIT_TEST_SUITE(TYqlExprConstraints) {
3131
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
3232
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
3333
typeAnnotationContext->RandomProvider = CreateDeterministicRandomProvider(1);
34-
auto ytState = MakeIntrusive<TYtState>();
34+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
3535
ytState->Gateway = ytGateway;
36-
ytState->Types = typeAnnotationContext.Get();
3736

3837
InitializeYtGateway(ytGateway, ytState);
3938
typeAnnotationContext->AddDataSink(YtProviderName, CreateYtDataSink(ytState));

yql/essentials/core/ut/yql_expr_discover_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ Y_UNIT_TEST_SUITE(TDiscoverYqlExpr) {
3131
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
3232
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
3333
typeAnnotationContext->DiscoveryMode = true;
34-
auto ytState = MakeIntrusive<TYtState>();
34+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
3535
ytState->Gateway = ytGateway;
36-
ytState->Types = typeAnnotationContext.Get();
3736

3837
InitializeYtGateway(ytGateway, ytState);
3938
auto randomProvider = CreateDeterministicRandomProvider(1);

yql/essentials/core/ut/yql_expr_optimize_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,8 @@ Y_UNIT_TEST_SUITE(TOptimizeYqlExpr) {
592592
auto yqlNativeServices = NFile::TYtFileServices::Make(functionRegistry.Get(), testTables);
593593
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
594594
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
595-
auto ytState = MakeIntrusive<TYtState>();
595+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
596596
ytState->Gateway = ytGateway;
597-
ytState->Types = typeAnnotationContext.Get();
598597

599598
InitializeYtGateway(ytGateway, ytState);
600599
auto randomProvider = CreateDeterministicRandomProvider(1);

yql/essentials/core/ut/yql_expr_providers_ut.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ Y_UNIT_TEST_SUITE(TCompileWithProvidersYqlExpr) {
5959
auto yqlNativeServices = NFile::TYtFileServices::Make(functionRegistry.Get(), testTables);
6060
auto ytGateway = CreateYtFileGateway(yqlNativeServices);
6161
auto typeAnnotationContext = MakeIntrusive<TTypeAnnotationContext>();
62-
auto ytState = MakeIntrusive<TYtState>();
62+
auto ytState = MakeIntrusive<TYtState>(typeAnnotationContext.Get());
6363
ytState->Gateway = ytGateway;
64-
ytState->Types = typeAnnotationContext.Get();
6564

6665
InitializeYtGateway(ytGateway, ytState);
6766
typeAnnotationContext->AddDataSink(YtProviderName, CreateYtDataSink(ytState));

yql/essentials/providers/common/provider/yql_provider.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,12 +1155,15 @@ std::pair<IGraphTransformer::TStatus, TAsyncTransformCallbackFuture> FreezeUsedF
11551155
return SyncError();
11561156
}
11571157

1158+
if (types.QContext.CanRead()) {
1159+
return SyncOk();
1160+
}
1161+
11581162
auto future = FreezeUserDataTableIfNeeded(types.UserDataStorage, files, urlDownloadFilter);
11591163
if (future.Wait(TDuration::Zero())) {
11601164
files = future.GetValue()();
11611165
return SyncOk();
1162-
}
1163-
else {
1166+
} else {
11641167
return std::make_pair(IGraphTransformer::TStatus::Async, future.Apply(
11651168
[](const NThreading::TFuture<std::function<TUserDataTable()>>& completedFuture) {
11661169
return TAsyncTransformCallback([completedFuture](const TExprNode::TPtr& input, TExprNode::TPtr& output, TExprContext& ctx) {

yql/essentials/sql/v1/query.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ static INode::TPtr CreateIndexDesc(const TIndexDescription& index, ETableSetting
319319
node.Q(node.Y(node.Q("dataColumns"), node.Q(dataColumns)))
320320
);
321321
if (index.TableSettings.IsSet()) {
322-
const auto& tableSettings = node.Y(
322+
const auto& tableSettings = node.Q(node.Y(
323323
node.Q("tableSettings"),
324324
node.Q(CreateTableSettings(index.TableSettings, parsingMode, node))
325-
);
325+
));
326326
indexNode = node.L(indexNode, tableSettings);
327327
}
328328
if (const auto* indexSettingsPtr = std::get_if<TVectorIndexSettings>(&index.IndexSettings)) {

0 commit comments

Comments
 (0)