Skip to content

Commit 90b9552

Browse files
describe handler added default family and familyname values (#8266)
1 parent 272f6fb commit 90b9552

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

ydb/core/viewer/viewer_describe.h

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,19 @@ class TJsonDescribe : public TViewerPipeClient {
248248
}
249249
}
250250
if (DescribeResult != nullptr) {
251-
if (ExpandSubElements) {
252-
if (DescribeResult->HasPathDescription()) {
253-
auto& pathDescription = *DescribeResult->MutablePathDescription();
254-
if (pathDescription.HasTable()) {
255-
auto& table = *pathDescription.MutableTable();
251+
if (DescribeResult->HasPathDescription()) {
252+
auto& pathDescription = *DescribeResult->MutablePathDescription();
253+
if (pathDescription.HasTable()) {
254+
auto& table = *pathDescription.MutableTable();
255+
for (auto& column : *table.MutableColumns()) {
256+
if (!column.HasFamily()) {
257+
column.SetFamily(0);
258+
}
259+
if (column.GetFamily() == 0 && !column.HasFamilyName()) {
260+
column.SetFamilyName("default");
261+
}
262+
}
263+
if (ExpandSubElements) {
256264
for (auto& tableIndex : table.GetTableIndexes()) {
257265
NKikimrSchemeOp::TDirEntry& child = *pathDescription.AddChildren();
258266
child.SetName(tableIndex.GetName());

0 commit comments

Comments
 (0)