aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvvv <vvvv@ydb.tech>2023-04-27 15:04:46 +0300
committervvvv <vvvv@ydb.tech>2023-04-27 15:04:46 +0300
commit47e15289b11e175db0b60f6347302750a6f0c2c3 (patch)
treedc1fe9668d9f9eef46e0ec92fc4d62d0cc9c278d
parent681e5dcf61f891c964ad601cb9645adba951dd64 (diff)
downloadydb-47e15289b11e175db0b60f6347302750a6f0c2c3.tar.gz
Removed unused LLVM_BC
-rw-r--r--ydb/library/yql/minikql/computation/CMakeLists.darwin-x86_64.txt80
-rw-r--r--ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt81
-rw-r--r--ydb/library/yql/minikql/computation/CMakeLists.linux-x86_64.txt81
-rw-r--r--ydb/library/yql/minikql/computation/CMakeLists.windows-x86_64.txt80
-rw-r--r--ydb/library/yql/minikql/computation/mkql_pack_bc.cpp200
5 files changed, 0 insertions, 522 deletions
diff --git a/ydb/library/yql/minikql/computation/CMakeLists.darwin-x86_64.txt b/ydb/library/yql/minikql/computation/CMakeLists.darwin-x86_64.txt
index dc5f3b95ff..d9c03950cb 100644
--- a/ydb/library/yql/minikql/computation/CMakeLists.darwin-x86_64.txt
+++ b/ydb/library/yql/minikql/computation/CMakeLists.darwin-x86_64.txt
@@ -6,12 +6,6 @@
# original buildsystem will not be accepted.
-get_built_tool_path(
- TOOL_rescompiler_bin
- TOOL_rescompiler_dependency
- tools/rescompiler/bin
- rescompiler
-)
add_library(yql-minikql-computation)
target_compile_options(yql-minikql-computation PRIVATE
@@ -39,7 +33,6 @@ target_link_libraries(yql-minikql-computation PUBLIC
lib-Target-X86
Target-X86-AsmParser
lib-Transforms-IPO
- library-cpp-resource
)
target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_computation_node.cpp
@@ -55,76 +48,3 @@ target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_value_builder.cpp
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/presort.cpp
)
-
-add_global_library_for(yql-minikql-computation.global yql-minikql-computation)
-target_compile_options(yql-minikql-computation.global PRIVATE
- -DUSE_CURRENT_UDF_ABI_VERSION
- $<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
-)
-target_link_libraries(yql-minikql-computation.global PUBLIC
- contrib-libs-cxxsupp
- yutil
- libs-apache-arrow
- library-cpp-enumbitset
- library-cpp-packedtypes
- library-cpp-random_provider
- library-cpp-time_provider
- library-yql-minikql
- yql-minikql-arrow
- parser-pg_wrapper-interface
- yql-public-udf
- library-yql-utils
- cpp-threading-future
- yql-minikql-codegen
- llvm12-lib-IR
- lib-ExecutionEngine-MCJIT
- llvm12-lib-Linker
- lib-Target-X86
- Target-X86-AsmParser
- lib-Transforms-IPO
- library-cpp-resource
-)
-target_sources(yql-minikql-computation.global PRIVATE
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- COMMAND
- ${LLVMOPT}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- -O2
- -globalopt
- -globaldce
- -internalize
- -internalize-public-api-list=FetchNextItem#GetElement#GetVariantItem#NextListItem#NextDictItem#PackString#PackStringData#PackBool#PackByte#PackFloat#PackDouble#PackInt32#PackUInt32#PackInt64#PackUInt64#GetListIterator#GetDictIterator#GetOptionalValue
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- COMMAND
- ${LLVMLINK}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
-)
-llvm_compile_cxx(yql-minikql-computation.global
- ${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- ${CLANGPLUSPLUS}
- -Wno-unknown-warning-option
- -emit-llvm
-)
-resources(yql-minikql-computation.global
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
- INPUTS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- KEYS
- /llvm_bc/mkql_pack.bc
-)
diff --git a/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt b/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt
index 584d25a4ff..f3f298212a 100644
--- a/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/minikql/computation/CMakeLists.linux-aarch64.txt
@@ -6,12 +6,6 @@
# original buildsystem will not be accepted.
-get_built_tool_path(
- TOOL_rescompiler_bin
- TOOL_rescompiler_dependency
- tools/rescompiler/bin
- rescompiler
-)
add_library(yql-minikql-computation)
target_compile_options(yql-minikql-computation PRIVATE
@@ -40,7 +34,6 @@ target_link_libraries(yql-minikql-computation PUBLIC
lib-Target-X86
Target-X86-AsmParser
lib-Transforms-IPO
- library-cpp-resource
)
target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_computation_node.cpp
@@ -56,77 +49,3 @@ target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_value_builder.cpp
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/presort.cpp
)
-
-add_global_library_for(yql-minikql-computation.global yql-minikql-computation)
-target_compile_options(yql-minikql-computation.global PRIVATE
- -DUSE_CURRENT_UDF_ABI_VERSION
- $<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
-)
-target_link_libraries(yql-minikql-computation.global PUBLIC
- contrib-libs-linux-headers
- contrib-libs-cxxsupp
- yutil
- libs-apache-arrow
- library-cpp-enumbitset
- library-cpp-packedtypes
- library-cpp-random_provider
- library-cpp-time_provider
- library-yql-minikql
- yql-minikql-arrow
- parser-pg_wrapper-interface
- yql-public-udf
- library-yql-utils
- cpp-threading-future
- yql-minikql-codegen
- llvm12-lib-IR
- lib-ExecutionEngine-MCJIT
- llvm12-lib-Linker
- lib-Target-X86
- Target-X86-AsmParser
- lib-Transforms-IPO
- library-cpp-resource
-)
-target_sources(yql-minikql-computation.global PRIVATE
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- COMMAND
- ${LLVMOPT}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- -O2
- -globalopt
- -globaldce
- -internalize
- -internalize-public-api-list=FetchNextItem#GetElement#GetVariantItem#NextListItem#NextDictItem#PackString#PackStringData#PackBool#PackByte#PackFloat#PackDouble#PackInt32#PackUInt32#PackInt64#PackUInt64#GetListIterator#GetDictIterator#GetOptionalValue
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- COMMAND
- ${LLVMLINK}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
-)
-llvm_compile_cxx(yql-minikql-computation.global
- ${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- ${CLANGPLUSPLUS}
- -Wno-unknown-warning-option
- -emit-llvm
-)
-resources(yql-minikql-computation.global
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
- INPUTS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- KEYS
- /llvm_bc/mkql_pack.bc
-)
diff --git a/ydb/library/yql/minikql/computation/CMakeLists.linux-x86_64.txt b/ydb/library/yql/minikql/computation/CMakeLists.linux-x86_64.txt
index 584d25a4ff..f3f298212a 100644
--- a/ydb/library/yql/minikql/computation/CMakeLists.linux-x86_64.txt
+++ b/ydb/library/yql/minikql/computation/CMakeLists.linux-x86_64.txt
@@ -6,12 +6,6 @@
# original buildsystem will not be accepted.
-get_built_tool_path(
- TOOL_rescompiler_bin
- TOOL_rescompiler_dependency
- tools/rescompiler/bin
- rescompiler
-)
add_library(yql-minikql-computation)
target_compile_options(yql-minikql-computation PRIVATE
@@ -40,7 +34,6 @@ target_link_libraries(yql-minikql-computation PUBLIC
lib-Target-X86
Target-X86-AsmParser
lib-Transforms-IPO
- library-cpp-resource
)
target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_computation_node.cpp
@@ -56,77 +49,3 @@ target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_value_builder.cpp
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/presort.cpp
)
-
-add_global_library_for(yql-minikql-computation.global yql-minikql-computation)
-target_compile_options(yql-minikql-computation.global PRIVATE
- -DUSE_CURRENT_UDF_ABI_VERSION
- $<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
-)
-target_link_libraries(yql-minikql-computation.global PUBLIC
- contrib-libs-linux-headers
- contrib-libs-cxxsupp
- yutil
- libs-apache-arrow
- library-cpp-enumbitset
- library-cpp-packedtypes
- library-cpp-random_provider
- library-cpp-time_provider
- library-yql-minikql
- yql-minikql-arrow
- parser-pg_wrapper-interface
- yql-public-udf
- library-yql-utils
- cpp-threading-future
- yql-minikql-codegen
- llvm12-lib-IR
- lib-ExecutionEngine-MCJIT
- llvm12-lib-Linker
- lib-Target-X86
- Target-X86-AsmParser
- lib-Transforms-IPO
- library-cpp-resource
-)
-target_sources(yql-minikql-computation.global PRIVATE
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- COMMAND
- ${LLVMOPT}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- -O2
- -globalopt
- -globaldce
- -internalize
- -internalize-public-api-list=FetchNextItem#GetElement#GetVariantItem#NextListItem#NextDictItem#PackString#PackStringData#PackBool#PackByte#PackFloat#PackDouble#PackInt32#PackUInt32#PackInt64#PackUInt64#GetListIterator#GetDictIterator#GetOptionalValue
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- COMMAND
- ${LLVMLINK}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
-)
-llvm_compile_cxx(yql-minikql-computation.global
- ${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- ${CLANGPLUSPLUS}
- -Wno-unknown-warning-option
- -emit-llvm
-)
-resources(yql-minikql-computation.global
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
- INPUTS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- KEYS
- /llvm_bc/mkql_pack.bc
-)
diff --git a/ydb/library/yql/minikql/computation/CMakeLists.windows-x86_64.txt b/ydb/library/yql/minikql/computation/CMakeLists.windows-x86_64.txt
index dc5f3b95ff..d9c03950cb 100644
--- a/ydb/library/yql/minikql/computation/CMakeLists.windows-x86_64.txt
+++ b/ydb/library/yql/minikql/computation/CMakeLists.windows-x86_64.txt
@@ -6,12 +6,6 @@
# original buildsystem will not be accepted.
-get_built_tool_path(
- TOOL_rescompiler_bin
- TOOL_rescompiler_dependency
- tools/rescompiler/bin
- rescompiler
-)
add_library(yql-minikql-computation)
target_compile_options(yql-minikql-computation PRIVATE
@@ -39,7 +33,6 @@ target_link_libraries(yql-minikql-computation PUBLIC
lib-Target-X86
Target-X86-AsmParser
lib-Transforms-IPO
- library-cpp-resource
)
target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_computation_node.cpp
@@ -55,76 +48,3 @@ target_sources(yql-minikql-computation PRIVATE
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_value_builder.cpp
${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/presort.cpp
)
-
-add_global_library_for(yql-minikql-computation.global yql-minikql-computation)
-target_compile_options(yql-minikql-computation.global PRIVATE
- -DUSE_CURRENT_UDF_ABI_VERSION
- $<IF:$<CXX_COMPILER_ID:MSVC>,,-Wno-everything>
-)
-target_link_libraries(yql-minikql-computation.global PUBLIC
- contrib-libs-cxxsupp
- yutil
- libs-apache-arrow
- library-cpp-enumbitset
- library-cpp-packedtypes
- library-cpp-random_provider
- library-cpp-time_provider
- library-yql-minikql
- yql-minikql-arrow
- parser-pg_wrapper-interface
- yql-public-udf
- library-yql-utils
- cpp-threading-future
- yql-minikql-codegen
- llvm12-lib-IR
- lib-ExecutionEngine-MCJIT
- llvm12-lib-Linker
- lib-Target-X86
- Target-X86-AsmParser
- lib-Transforms-IPO
- library-cpp-resource
-)
-target_sources(yql-minikql-computation.global PRIVATE
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- COMMAND
- ${LLVMOPT}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- -O2
- -globalopt
- -globaldce
- -internalize
- -internalize-public-api-list=FetchNextItem#GetElement#GetVariantItem#NextListItem#NextDictItem#PackString#PackStringData#PackBool#PackByte#PackFloat#PackDouble#PackInt32#PackUInt32#PackInt64#PackUInt64#GetListIterator#GetDictIterator#GetOptionalValue
-)
-add_custom_command(
- OUTPUT
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
- DEPENDS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- COMMAND
- ${LLVMLINK}
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- -o
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_merged.bc
-)
-llvm_compile_cxx(yql-minikql-computation.global
- ${CMAKE_SOURCE_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp.bc
- ${CLANGPLUSPLUS}
- -Wno-unknown-warning-option
- -emit-llvm
-)
-resources(yql-minikql-computation.global
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/4dc9194f4b8472492eed05889d2e69e4.cpp
- INPUTS
- ${CMAKE_BINARY_DIR}/ydb/library/yql/minikql/computation/mkql_pack.bc_optimized.bc
- KEYS
- /llvm_bc/mkql_pack.bc
-)
diff --git a/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp b/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp
deleted file mode 100644
index 68441746c3..0000000000
--- a/ydb/library/yql/minikql/computation/mkql_pack_bc.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-#include <util/generic/buffer.h>
-
-#include <ydb/library/yql/public/udf/udf_value.h>
-#include <ydb/library/yql/minikql/pack_num.h>
-#include <library/cpp/packedtypes/zigzag.h>
-
-#include <ydb/library/yql/minikql/defs.h>
-#include "mkql_optional_usage_mask.h"
-
-using namespace NKikimr;
-
-namespace NDetails {
-
-void PackUInt64(ui64 pos, ui64 val, TBuffer& buf) {
- const auto actual = Pack64(val, buf.Data() + pos);
- buf.Chop(pos + actual, MAX_PACKED64_SIZE - actual);
-}
-
-void PackUInt64(ui64 val, TBuffer& buf) {
- size_t off = buf.Size();
- buf.Advance(MAX_PACKED64_SIZE);
- buf.EraseBack(MAX_PACKED64_SIZE - Pack64(val, buf.Data() + off));
-}
-
-void PackInt64(i64 val, TBuffer& buf) {
- PackUInt64(ZigZagEncode(val), buf);
-}
-
-void PackUInt32(ui32 val, TBuffer& buf) {
- size_t off = buf.Size();
- buf.Advance(MAX_PACKED32_SIZE);
- buf.EraseBack(MAX_PACKED32_SIZE - Pack32(val, buf.Data() + off));
-}
-
-void PackInt32(i32 val, TBuffer& buf) {
- PackUInt32(ZigZagEncode(val), buf);
-}
-
-ui64 UnpackUInt64(TStringBuf& buf) {
- ui64 res = 0;
- size_t read = Unpack64(buf.data(), buf.length(), res);
- MKQL_ENSURE(read, "Bad ui64 packed data");
- buf.Skip(read);
- return res;
-}
-
-i64 UnpackInt64(TStringBuf& buf) {
- return ZigZagDecode(UnpackUInt64(buf));
-}
-
-ui32 UnpackUInt32(TStringBuf& buf) {
- ui32 res = 0;
- size_t read = Unpack32(buf.data(), buf.length(), res);
- MKQL_ENSURE(read, "Bad ui32 packed data");
- buf.Skip(read);
- return res;
-}
-
-i32 UnpackInt32(TStringBuf& buf) {
- return ZigZagDecode(UnpackUInt32(buf));
-}
-
-template <typename T>
-void PutRawData(T val, TBuffer& buf) {
- buf.Append(reinterpret_cast<const char*>(&val), sizeof(T));
-}
-
-template <typename T>
-T GetRawData(TStringBuf& buf) {
- MKQL_ENSURE(sizeof(T) <= buf.size(), "Bad packed data. Buffer too small");
- T val = 0;
- std::memcpy(&val, buf.data(), sizeof(T));
- buf.Skip(sizeof(T));
- return val;
-}
-
-}
-
-extern "C" void GetElement(const TRawUV* value, ui32 index, TRawUV* item) {
- const auto result(reinterpret_cast<const NUdf::TUnboxedValuePod*>(value)->GetElement(index));
- *item = reinterpret_cast<const TRawUV&>(result);
-}
-
-extern "C" bool FetchNextItem(const TRawUV* value, TRawUV* item) {
- NUdf::TUnboxedValue fetch;
- if (NUdf::EFetchStatus::Finish == reinterpret_cast<const NUdf::TUnboxedValuePod*>(value)->Fetch(fetch))
- return false;
- *item = reinterpret_cast<TRawUV&>(fetch);
- return true;
-}
-
-extern "C" bool NextListItem(TRawUV* value, TRawUV* item) {
- NUdf::TUnboxedValue next;
- const auto v = reinterpret_cast<NUdf::TUnboxedValuePod*>(value);
- if (!v->Next(next)) {
- v->DeleteUnreferenced();
- return false;
- }
-
- *item = reinterpret_cast<TRawUV&>(next);
- return true;
-}
-
-extern "C" bool NextDictItem(TRawUV* value, TRawUV* first, TRawUV* second) {
- NUdf::TUnboxedValue key, payload;
- const auto v = reinterpret_cast<NUdf::TUnboxedValuePod*>(value);
- if (!v->NextPair(key, payload)) {
- v->DeleteUnreferenced();
- return false;
- }
-
- *first = reinterpret_cast<TRawUV&>(key);
- *second = reinterpret_cast<TRawUV&>(payload);
- return true;
-}
-
-extern "C" void PackString(const TRawUV* value, ui64* buffer) {
- const auto& stringRef = reinterpret_cast<const NUdf::TUnboxedValue*>(value)->AsStringRef();
- NDetails::PackUInt32(stringRef.Size(), *reinterpret_cast<TBuffer*>(buffer));
- reinterpret_cast<TBuffer*>(buffer)->Append(stringRef.Data(), stringRef.Size());
-}
-
-extern "C" void PackStringData(const TRawUV* value, ui64* buffer) {
- const auto& stringRef = reinterpret_cast<const NUdf::TUnboxedValue*>(value)->AsStringRef();
- reinterpret_cast<TBuffer*>(buffer)->Append(stringRef.Data(), stringRef.Size());
-}
-
-extern "C" void PackBool(const TRawUV* value, ui64* buffer) {
- NDetails::PutRawData(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<bool>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" void PackByte(const TRawUV* value, ui64* buffer) {
- NDetails::PutRawData(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<ui8>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" void PackInt32(const TRawUV* value, ui64* buffer) {
- NDetails::PackInt32(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<i32>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" void PackUInt32(const TRawUV* value, ui64* buffer) {
- NDetails::PackUInt32(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<ui32>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" void PackInt64(const TRawUV* value, ui64* buffer) {
- NDetails::PackInt64(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<i64>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" void PackUInt64(const TRawUV* value, ui64* buffer) {
- NDetails::PackUInt64(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<ui64>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" void PackFloat(const TRawUV* value, ui64* buffer) {
- NDetails::PutRawData(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<float>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" void PackDouble(const TRawUV* value, ui64* buffer) {
- NDetails::PutRawData(reinterpret_cast<const NUdf::TUnboxedValue*>(value)->Get<double>(), *reinterpret_cast<TBuffer*>(buffer));
-}
-
-extern "C" ui32 GetVariantItem(const TRawUV* value, TRawUV* item, ui64* buffer) {
- const auto v = reinterpret_cast<const NUdf::TUnboxedValuePod*>(value);
- const ui32 index = v->GetVariantIndex();
- NDetails::PackUInt32(index, *reinterpret_cast<TBuffer*>(buffer));
- const auto result(v->GetVariantItem());
- *item = reinterpret_cast<const TRawUV&>(result);
- return index;
-}
-
-extern "C" bool GetListIterator(const TRawUV* value, TRawUV* item, ui64* buffer) {
- const auto v = reinterpret_cast<const NUdf::TUnboxedValuePod*>(value);
- const auto size = v->GetListLength();
- NDetails::PackUInt64(size, *reinterpret_cast<TBuffer*>(buffer));
- if (!size)
- return false;
- const auto result(v->GetListIterator().Release());
- *item = reinterpret_cast<const TRawUV&>(result);
- return true;
-}
-
-extern "C" bool GetDictIterator(const TRawUV* value, TRawUV* item, ui64* buffer) {
- const auto v = reinterpret_cast<const NUdf::TUnboxedValuePod*>(value);
- const auto size = v->GetDictLength();
- NDetails::PackUInt64(size, *reinterpret_cast<TBuffer*>(buffer));
- if (!size)
- return false;
- const auto result(v->GetDictIterator().Release());
- *item = reinterpret_cast<const TRawUV&>(result);
- return true;
-}
-
-extern "C" bool GetOptionalValue(const TRawUV* value, TRawUV* item, ui64* mask) {
- const auto v = reinterpret_cast<const NUdf::TUnboxedValuePod*>(value);
- const bool has = bool(*v);
- reinterpret_cast<NMiniKQL::NDetails::TOptionalUsageMask*>(mask)->SetNextEmptyOptional(!*v);
- if (has) {
- const auto result(v->GetOptionalValue());
- *item = reinterpret_cast<const TRawUV&>(result);
- }
- return has;
-}