diff --git a/ydb/library/yql/providers/yt/comp_nodes/dq/arrow_converter.cpp b/ydb/library/yql/providers/yt/comp_nodes/dq/arrow_converter.cpp index 6a6413d72616..4233e27eaf29 100644 --- a/ydb/library/yql/providers/yt/comp_nodes/dq/arrow_converter.cpp +++ b/ydb/library/yql/providers/yt/comp_nodes/dq/arrow_converter.cpp @@ -38,12 +38,20 @@ arrow::Datum NumericConverterImpl(NUdf::IArrayBuilder* builder, std::shared_ptr< if (val.IsNull(i)) { builder->Add(NUdf::TBlockItem{}); } else { - builder->Add(NUdf::TBlockItem(val.Value(i))); + if constexpr (std::is_same_v) { + builder->Add(NUdf::TBlockItem((ui8)val.Value(i))); + } else { + builder->Add(NUdf::TBlockItem(val.Value(i))); + } } } } else { for (i64 i = 0; i < block->length; ++i) { - builder->Add(NUdf::TBlockItem(val.Value(i))); + if constexpr (std::is_same_v) { + builder->Add(NUdf::TBlockItem((ui8)val.Value(i))); + } else { + builder->Add(NUdf::TBlockItem(val.Value(i))); + } } } return builder->Build(false); @@ -56,12 +64,20 @@ arrow::Datum NumericConverterImpl(NUdf::IArrayBuilder* builder, std::shared_ptr< if (dict.IsNull(i)) { builder->Add(NUdf::TBlockItem{}); } else { - builder->Add(NUdf::TBlockItem(val.Value(data[i]))); + if constexpr (std::is_same_v) { + builder->Add(NUdf::TBlockItem((ui8)val.Value(data[i]))); + } else { + builder->Add(NUdf::TBlockItem(val.Value(data[i]))); + } } } } else { for (i64 i = 0; i < block->length; ++i) { - builder->Add(NUdf::TBlockItem(val.Value(data[i]))); + if constexpr (std::is_same_v) { + builder->Add(NUdf::TBlockItem((ui8)val.Value(data[i]))); + } else { + builder->Add(NUdf::TBlockItem(val.Value(data[i]))); + } } } return builder->Build(false); @@ -402,6 +418,7 @@ class TPrimitiveColumnConverter { public: TPrimitiveColumnConverter(TYtColumnConverterSettings& settings) : Settings_(settings) { switch (Settings_.ArrowType->id()) { + case arrow::Type::BOOL: PrimitiveConverterImpl_ = GEN_TYPE(Boolean); break; case arrow::Type::INT8: PrimitiveConverterImpl_ = GEN_TYPE(Int8); break; case arrow::Type::UINT8: PrimitiveConverterImpl_ = GEN_TYPE(UInt8); break; case arrow::Type::INT16: PrimitiveConverterImpl_ = GEN_TYPE(Int16); break; diff --git a/ydb/library/yql/providers/yt/comp_nodes/dq/ya.make b/ydb/library/yql/providers/yt/comp_nodes/dq/ya.make index 48ae5d6ea10c..cba05d599a94 100644 --- a/ydb/library/yql/providers/yt/comp_nodes/dq/ya.make +++ b/ydb/library/yql/providers/yt/comp_nodes/dq/ya.make @@ -1,11 +1,11 @@ LIBRARY() PEERDIR( + ydb/library/yql/minikql ydb/library/yql/minikql/computation/llvm ydb/library/yql/providers/yt/comp_nodes ydb/library/yql/providers/yt/codec ydb/library/yql/providers/common/codec - ydb/core/formats/arrow yt/cpp/mapreduce/interface yt/cpp/mapreduce/common library/cpp/yson/node @@ -27,6 +27,7 @@ IF(LINUX) ) SRCS( + arrow_converter.cpp stream_decoder.cpp dq_yt_rpc_reader.cpp dq_yt_rpc_helpers.cpp