Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions ydb/core/grpc_services/rpc_describe_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ class TBaseDescribe : public TRpcSchemeRequestActor<TDerived, TRequest> {
return SendProposeRequest(ctx, this->GetProtoRequest()->path());
}

if (entry.Kind != TSchemeCacheNavigate::EKind::KindCdcStream) {
return SendProposeRequest(ctx, this->GetProtoRequest()->path());
switch (entry.Kind) {
case TSchemeCacheNavigate::EKind::KindCdcStream:
case TSchemeCacheNavigate::EKind::KindIndex:
break;
default:
return SendProposeRequest(ctx, this->GetProtoRequest()->path());
}

if (!entry.Self || !entry.ListNodeEntry) {
Expand All @@ -79,10 +83,10 @@ class TBaseDescribe : public TRpcSchemeRequestActor<TDerived, TRequest> {
}

OverrideName = entry.Self->Info.GetName();
const auto& topicName = entry.ListNodeEntry->Children.at(0).Name;
const auto& childName = entry.ListNodeEntry->Children.at(0).Name;

return SendProposeRequest(ctx,
NKikimr::JoinPath(NKikimr::ChildPath(NKikimr::SplitPath(this->GetProtoRequest()->path()), topicName)));
NKikimr::JoinPath(NKikimr::ChildPath(NKikimr::SplitPath(this->GetProtoRequest()->path()), childName)));
}

void SendProposeRequest(const TActorContext& ctx, const TString& path) {
Expand Down
6 changes: 6 additions & 0 deletions ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4131,6 +4131,7 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
Y_UNIT_TEST(DescribeIndexTable) {
TKikimrRunner kikimr;
auto db = kikimr.GetTableClient();
auto scheme = NYdb::NScheme::TSchemeClient(kikimr.GetDriver(), TCommonClientSettings().Database("/Root"));
auto session = db.CreateSession().GetValueSync().GetSession();

{
Expand All @@ -4147,6 +4148,11 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
auto result = session.ExecuteSchemeQuery(query).GetValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
}
{
auto desc = scheme.DescribePath("/Root/table/SyncIndex").ExtractValueSync();
UNIT_ASSERT_C(desc.IsSuccess(), desc.GetIssues().ToString());
UNIT_ASSERT_VALUES_EQUAL(desc.GetEntry().Name, "SyncIndex");
}
{
auto desc = session.DescribeTable("/Root/table/SyncIndex").ExtractValueSync();
UNIT_ASSERT_C(desc.IsSuccess(), desc.GetIssues().ToString());
Expand Down
Loading