Skip to content

Commit cdcb2e6

Browse files
authored
Fix ALTER OBJECT for SHOW CREATE TABLE (#18531)
1 parent 36ed8f4 commit cdcb2e6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ydb/core/sys_view/show_create/create_table_formatter.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,8 +1239,14 @@ TFormatResult TCreateTableFormatter::Format(const TString& tablePath, const TStr
12391239
}
12401240

12411241
if (!schema.GetIndexes().empty()) {
1242-
for (const auto& index : schema.GetIndexes()) {
1243-
FormatUpsertIndex(fullPath, index, columns);
1242+
try {
1243+
for (const auto& index : schema.GetIndexes()) {
1244+
FormatUpsertIndex(fullPath, index, columns);
1245+
}
1246+
} catch (const TFormatFail& ex) {
1247+
return TFormatResult(ex.Status, ex.Error);
1248+
} catch (const yexception& e) {
1249+
return TFormatResult(Ydb::StatusIds::UNSUPPORTED, e.what());
12441250
}
12451251
}
12461252

@@ -1730,7 +1736,7 @@ void TCreateTableFormatter::FormatUpsertIndex(const TString& fullPath, const NKi
17301736
if (bloomNGrammFilter.HasFilterSizeBytes()) {
17311737
json["filter_size_bytes"] = bloomNGrammFilter.GetFilterSizeBytes();
17321738
}
1733-
if (bloomNGrammFilter.HasFilterSizeBytes()) {
1739+
if (bloomNGrammFilter.HasHashesCount()) {
17341740
json["hashes_count"] = bloomNGrammFilter.GetHashesCount();
17351741
}
17361742
if (bloomNGrammFilter.HasCaseSensitive()) {

0 commit comments

Comments
 (0)