Skip to content

Commit cde1dc2

Browse files
authored
Added processing sys view path type in GRPC handlers (#19030)
1 parent 8da33cb commit cde1dc2

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

ydb/core/grpc_services/rpc_kh_describe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class TKikhouseDescribeTableRPC : public TActorBootstrapped<TKikhouseDescribeTab
228228
void ResolveShards(const NActors::TActorContext& ctx) {
229229
auto& entry = ResolveNamesResult->ResultSet.front();
230230

231-
if (entry.TableId.IsSystemView()) {
231+
if (entry.TableId.IsSystemView() || entry.Kind == NSchemeCache::TSchemeCacheNavigate::KindSysView) {
232232
// Add fake shard for sys view
233233
auto* p = Result.add_partitions();
234234
p->set_tablet_id(1);

ydb/core/grpc_services/rpc_read_columns.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ class TReadColumnsRPC : public TActorBootstrapped<TReadColumnsRPC> {
230230
ctx);
231231
}
232232

233-
if (ResolveNamesResult->ResultSet.front().TableId.IsSystemView()) {
233+
if (entry.TableId.IsSystemView() || entry.Kind == NSchemeCache::TSchemeCacheNavigate::KindSysView) {
234234
return ScanSystemView(ctx);
235-
} if (TryParseLocalDbPath(ResolveNamesResult->ResultSet.front().Path)) {
235+
} if (TryParseLocalDbPath(entry.Path)) {
236236
return ScanLocalDbTable(ctx);
237237
} else {
238238
return ResolveShards(ctx);

ydb/core/grpc_services/rpc_read_rows.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class TReadRowsRPC : public TActorBootstrapped<TReadRowsRPC> {
385385
OwnerId = entry.Self->Info.GetSchemeshardId();
386386
TableId = entry.Self->Info.GetPathId();
387387

388-
if (entry.TableId.IsSystemView()) {
388+
if (entry.TableId.IsSystemView() || entry.Kind == NSchemeCache::TSchemeCacheNavigate::KindSysView) {
389389
return ReplyWithError(Ydb::StatusIds::SCHEME_ERROR,
390390
Sprintf("Table '%s' is a system view. ReadRows is not supported.", GetTable().c_str()));
391391
}
@@ -592,7 +592,7 @@ class TReadRowsRPC : public TActorBootstrapped<TReadRowsRPC> {
592592
}
593593
case NScheme::NTypeIds::Decimal: {
594594
return NYdb::TTypeBuilder().Decimal(NYdb::TDecimalType(
595-
typeInfo.GetDecimalType().GetPrecision(),
595+
typeInfo.GetDecimalType().GetPrecision(),
596596
typeInfo.GetDecimalType().GetScale()))
597597
.Build();
598598
}

ydb/public/api/protos/ydb_scheme.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ message Entry {
6767
VIEW = 20;
6868
RESOURCE_POOL = 21;
6969
TRANSFER = 23;
70+
SYS_VIEW = 24;
7071
}
7172

7273
// Name of scheme entry (dir2 of /dir1/dir2)

0 commit comments

Comments
 (0)