aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp
diff options
context:
space:
mode:
authornadya02 <nadya02@yandex-team.com>2024-04-04 17:09:52 +0300
committernadya02 <nadya02@yandex-team.com>2024-04-04 17:22:54 +0300
commit0ac31bd5d16b896e73bc19a09dc8023e1345e034 (patch)
treedd9019b4c539673d877a536a6e1bfc7b81f4cdbc /yt/cpp
parentd3b7159d4281e3d6d92f39a0e2ff7833e68a86d4 (diff)
downloadydb-0ac31bd5d16b896e73bc19a09dc8023e1345e034.tar.gz
Fix preedirs yt/cpp/mapreduce/library/table_schema
fix preedirs 6bb186d9bd0ececb764c3e8596d8360098ad5124
Diffstat (limited to 'yt/cpp')
-rw-r--r--yt/cpp/mapreduce/client/ya.make1
-rw-r--r--yt/cpp/mapreduce/library/table_schema/arrow.cpp88
-rw-r--r--yt/cpp/mapreduce/library/table_schema/arrow.h15
-rw-r--r--yt/cpp/mapreduce/library/table_schema/protobuf.cpp1
-rw-r--r--yt/cpp/mapreduce/library/table_schema/ya.make17
5 files changed, 0 insertions, 122 deletions
diff --git a/yt/cpp/mapreduce/client/ya.make b/yt/cpp/mapreduce/client/ya.make
index 3696a9ba8f..2d118b2442 100644
--- a/yt/cpp/mapreduce/client/ya.make
+++ b/yt/cpp/mapreduce/client/ya.make
@@ -42,7 +42,6 @@ PEERDIR(
yt/cpp/mapreduce/http
yt/cpp/mapreduce/interface
yt/cpp/mapreduce/io
- yt/cpp/mapreduce/library/table_schema
yt/cpp/mapreduce/raw_client
)
diff --git a/yt/cpp/mapreduce/library/table_schema/arrow.cpp b/yt/cpp/mapreduce/library/table_schema/arrow.cpp
deleted file mode 100644
index 73bce9bf19..0000000000
--- a/yt/cpp/mapreduce/library/table_schema/arrow.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-#include "arrow.h"
-
-#include <yt/yt/core/misc/error.h>
-
-#include <library/cpp/yt/assert/assert.h>
-
-#include <contrib/libs/apache/arrow/cpp/src/arrow/api.h>
-#include <contrib/libs/apache/arrow/cpp/src/arrow/io/api.h>
-#include <contrib/libs/apache/arrow/cpp/src/arrow/io/memory.h>
-#include <contrib/libs/apache/arrow/cpp/src/arrow/ipc/api.h>
-
-namespace NYT {
-
-namespace {
-
-////////////////////////////////////////////////////////////////////////////////
-
-NTi::TTypePtr GetYTType(const std::shared_ptr<arrow::DataType>& arrowType)
-{
- switch (arrowType->id()) {
- case arrow::Type::type::BOOL:
- return NTi::Bool();
-
- case arrow::Type::type::UINT8:
- return NTi::Uint8();
- case arrow::Type::type::UINT16:
- return NTi::Uint16();
- case arrow::Type::type::UINT32:
- return NTi::Uint32();
- case arrow::Type::type::UINT64:
- return NTi::Uint64();
-
- case arrow::Type::type::INT8:
- return NTi::Int8();
- case arrow::Type::type::INT16:
- return NTi::Int16();
- case arrow::Type::type::DATE32:
- case arrow::Type::type::TIME32:
- case arrow::Type::type::INT32:
- return NTi::Int32();
- case arrow::Type::type::DATE64:
- case arrow::Type::type::TIMESTAMP:
- case arrow::Type::type::INT64:
- case arrow::Type::type::TIME64:
- return NTi::Int64();
-
- case arrow::Type::type::HALF_FLOAT:
- case arrow::Type::type::FLOAT:
- return NTi::Float();
- case arrow::Type::type::DOUBLE:
- return NTi::Double();
-
- case arrow::Type::type::STRING:
- case arrow::Type::type::BINARY:
- case arrow::Type::type::FIXED_SIZE_BINARY:
- return NTi::String();
-
- case arrow::Type::type::LIST:
- return NTi::List(
- GetYTType(std::reinterpret_pointer_cast<arrow::ListType>(arrowType)->value_type()));
-
- case arrow::Type::type::MAP:
- return NTi::Dict(
- GetYTType(std::reinterpret_pointer_cast<arrow::MapType>(arrowType)->key_type()),
- GetYTType(std::reinterpret_pointer_cast<arrow::MapType>(arrowType)->item_type()));
-
- default:
- THROW_ERROR_EXCEPTION("Unsupported arrow type: %v", arrowType->ToString());
- }
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-
-TTableSchema CreateYTTableSchemaFromArrowSchema(const std::shared_ptr<arrow::Schema>& arrowSchema)
-{
- TTableSchema resultSchema;
- for (const auto& field : arrowSchema->fields()) {
- auto ytType = NTi::Optional(GetYTType(field->type()));
- resultSchema.AddColumn(TColumnSchema().Name(TString(field->name())).TypeV3(ytType));
- }
- return resultSchema;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-} // namespace NYT
diff --git a/yt/cpp/mapreduce/library/table_schema/arrow.h b/yt/cpp/mapreduce/library/table_schema/arrow.h
deleted file mode 100644
index bf06ab1f20..0000000000
--- a/yt/cpp/mapreduce/library/table_schema/arrow.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-
-#include <yt/cpp/mapreduce/interface/common.h>
-
-#include <contrib/libs/apache/arrow/cpp/src/arrow/api.h>
-
-namespace NYT {
-
-////////////////////////////////////////////////////////////////////////////////
-
-TTableSchema CreateYTTableSchemaFromArrowSchema(const std::shared_ptr<arrow::Schema>& arrowSchema);
-
-////////////////////////////////////////////////////////////////////////////////
-
-} // namespace NYT
diff --git a/yt/cpp/mapreduce/library/table_schema/protobuf.cpp b/yt/cpp/mapreduce/library/table_schema/protobuf.cpp
deleted file mode 100644
index 888da828e7..0000000000
--- a/yt/cpp/mapreduce/library/table_schema/protobuf.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "protobuf.h"
diff --git a/yt/cpp/mapreduce/library/table_schema/ya.make b/yt/cpp/mapreduce/library/table_schema/ya.make
deleted file mode 100644
index 06541201b5..0000000000
--- a/yt/cpp/mapreduce/library/table_schema/ya.make
+++ /dev/null
@@ -1,17 +0,0 @@
-LIBRARY()
-
-INCLUDE(${ARCADIA_ROOT}/yt/ya_cpp.make.inc)
-
-SRCS(
- arrow.cpp
- protobuf.h
- protobuf.cpp
-)
-
-PEERDIR(
- yt/cpp/mapreduce/interface
-
- contrib/libs/apache/arrow
-)
-
-END()