diff options
author | Egor Chunaev <egor.chunaev@pinely.com> | 2023-11-23 18:08:40 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-23 18:36:56 +0300 |
commit | 1c6a0f0555dad6bcacf5ef2614d7cd88627609f0 (patch) | |
tree | f953529aff78e88ec7be727345e0a50bc457d849 /yt/cpp/mapreduce/client | |
parent | 50c69e8394f3c3e1afef75878953a4c4691d4383 (diff) | |
download | ydb-1c6a0f0555dad6bcacf5ef2614d7cd88627609f0.tar.gz |
Fix serialization of decimal type in TTableSchema
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Fix for https://github.com/ytsaurus/ytsaurus/issues/173
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/174
Co-authored-by: ermolovd <ermolovd@yandex-team.com>
Diffstat (limited to 'yt/cpp/mapreduce/client')
-rw-r--r-- | yt/cpp/mapreduce/client/skiff.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/yt/cpp/mapreduce/client/skiff.cpp b/yt/cpp/mapreduce/client/skiff.cpp index ab133e1ae3..1eb2e80d79 100644 --- a/yt/cpp/mapreduce/client/skiff.cpp +++ b/yt/cpp/mapreduce/client/skiff.cpp @@ -108,12 +108,18 @@ NSkiff::TSkiffSchemaPtr CreateSkiffSchema( TVector<TSkiffSchemaPtr> skiffColumns; for (const auto& column: schema.Columns()) { TSkiffSchemaPtr skiffColumn; + if (column.Deleted().Defined() && *column.Deleted()) { + continue; + } if (column.Type() == VT_ANY && *column.TypeV3() != *NTi::Optional(NTi::Yson())) { // We ignore all complex types until YT-12717 is done. return nullptr; } - if (column.Deleted().Defined() && *column.Deleted()) { - continue; + if (column.TypeV3()->IsDecimal() || + column.TypeV3()->IsOptional() && column.TypeV3()->AsOptional()->GetItemType()->IsDecimal()) + { + // Complex logic for decimal types, ignore them for now. + return nullptr; } if (column.Required() || NTi::IsSingular(column.TypeV3()->GetTypeName())) { skiffColumn = CreateSimpleTypeSchema(ValueTypeToSkiffType(column.Type())); |