Skip to content

Commit 35b059a

Browse files
authored
Return default decimal if scheme proto is empty (#13555)
1 parent 55ecb5a commit 35b059a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ydb/core/scheme/scheme_types_proto.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ NScheme::TTypeInfo TypeInfoFromProto(NScheme::TTypeId typeId, const ::NKikimrPro
9292
return NScheme::TTypeInfo(NPg::TypeDescFromPgTypeId(typeInfoProto.GetPgTypeId()));
9393
}
9494
case NScheme::NTypeIds::Decimal: {
95-
Y_ABORT_UNLESS(typeInfoProto.HasDecimalPrecision());
96-
Y_ABORT_UNLESS(typeInfoProto.HasDecimalScale());
95+
if (!typeInfoProto.HasDecimalPrecision() || !typeInfoProto.HasDecimalScale()) {
96+
return NScheme::TTypeInfo(NScheme::TDecimalType::Default());
97+
}
9798
NScheme::TDecimalType decimal(typeInfoProto.GetDecimalPrecision(), typeInfoProto.GetDecimalScale());
9899
return NScheme::TTypeInfo(decimal);
99100
}

0 commit comments

Comments
 (0)