From a5728ba92f2c1f803f932f9153aa2c264f8ee313 Mon Sep 17 00:00:00 2001 From: Pisarenko Grigoriy Date: Tue, 18 Nov 2025 17:32:30 +0300 Subject: [PATCH] Fixed empty sys view without user token --- .../federated_query/datastreams/datastreams_ut.cpp | 14 ++++++++++++++ .../streaming_queries/streaming_queries.cpp | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp b/ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp index 727eae125666..0c5bbb533087 100644 --- a/ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp +++ b/ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp @@ -3388,6 +3388,20 @@ Y_UNIT_TEST_SUITE(KqpStreamingQueriesSysView) { }, "Path = '/Root/C'"); } + Y_UNIT_TEST_F(ReadWithoutAuth, TStreamingSysViewTestFixture) { + QueryClientSettings = TClientSettings(); + Setup(); + + StartQuery("A"); + StartQuery("B"); + StartQuery("C"); + Sleep(STATS_WAIT_DURATION); + + CheckSysView({ + {"A"}, {"B"}, {"C"} + }); + } + Y_UNIT_TEST_F(SortOrderForSysView, TStreamingSysViewTestFixture) { Setup(); diff --git a/ydb/core/sys_view/streaming_queries/streaming_queries.cpp b/ydb/core/sys_view/streaming_queries/streaming_queries.cpp index 5fa6fdabd020..590363841565 100644 --- a/ydb/core/sys_view/streaming_queries/streaming_queries.cpp +++ b/ydb/core/sys_view/streaming_queries/streaming_queries.cpp @@ -285,7 +285,10 @@ class TSchemeDescribeActorBase : public TActorBootstrapped { auto request = std::make_unique(); request->DatabaseName = Database; - request->UserToken = UserToken; + + if (UserToken && UserToken->GetSanitizedToken()) { + request->UserToken = UserToken; + } request->ResultSet.reserve(Paths.size()); for (const auto& path : Paths) {