diff options
author | mrlolthe1st <[email protected]> | 2025-03-21 16:42:55 +0300 |
---|---|---|
committer | mrlolthe1st <[email protected]> | 2025-03-21 16:57:52 +0300 |
commit | 14490063aad899a8b8ea69b831388de083289e84 (patch) | |
tree | b34f59c78dbefbaae32a6eb8dff708b346ab6c5b /yql/essentials/parser | |
parent | 2f55a4a4796125cdcbe7b7720d8a63f32296e732 (diff) |
YQL-19716: Fix Block Reader
commit_hash:61891dc030f4c526542b5e7e070d1660880e6c08
Diffstat (limited to 'yql/essentials/parser')
-rw-r--r-- | yql/essentials/parser/pg_wrapper/arena_ctx.cpp | 11 | ||||
-rw-r--r-- | yql/essentials/parser/pg_wrapper/arrow.cpp | 1 | ||||
-rw-r--r-- | yql/essentials/parser/pg_wrapper/interface/codec.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/yql/essentials/parser/pg_wrapper/arena_ctx.cpp b/yql/essentials/parser/pg_wrapper/arena_ctx.cpp index e91cd6ad7a2..6439aaa18a1 100644 --- a/yql/essentials/parser/pg_wrapper/arena_ctx.cpp +++ b/yql/essentials/parser/pg_wrapper/arena_ctx.cpp @@ -30,9 +30,9 @@ extern MemoryContext ArenaGetChunkContext(void *pointer); extern Size ArenaGetChunkSpace(void *pointer); extern bool ArenaIsEmpty(MemoryContext context); extern void ArenaStats(MemoryContext context, - MemoryStatsPrintFunc printfunc, void *passthru, - MemoryContextCounters *totals, - bool print_to_stderr); + MemoryStatsPrintFunc printfunc, void *passthru, + MemoryContextCounters *totals, + bool print_to_stderr); #ifdef MEMORY_CONTEXT_CHECKING extern void ArenaCheck(MemoryContext context); #endif @@ -137,4 +137,9 @@ void TArenaMemoryContext::Release() { Prev = nullptr; } +namespace NCommon { +std::shared_ptr<void> CreateMemoryArenaContext() { + return std::make_shared<TArenaMemoryContext>(); +} +} } diff --git a/yql/essentials/parser/pg_wrapper/arrow.cpp b/yql/essentials/parser/pg_wrapper/arrow.cpp index ee52e76aacb..93b27ccdf99 100644 --- a/yql/essentials/parser/pg_wrapper/arrow.cpp +++ b/yql/essentials/parser/pg_wrapper/arrow.cpp @@ -436,7 +436,6 @@ NUdf::TBlockItem BlockItemFromDatum(Datum datum, const NPg::TTypeDesc& desc, std } NUdf::TBlockItem PgBlockItemFromNativeBinary(const TStringBuf binary, ui32 pgTypeId, std::vector<char>& tmp) { - NKikimr::NMiniKQL::TPAllocScope call; StringInfoData stringInfo; stringInfo.data = (char*)binary.Data(); stringInfo.len = binary.Size(); diff --git a/yql/essentials/parser/pg_wrapper/interface/codec.h b/yql/essentials/parser/pg_wrapper/interface/codec.h index c2aa3c4af0d..a3a634be831 100644 --- a/yql/essentials/parser/pg_wrapper/interface/codec.h +++ b/yql/essentials/parser/pg_wrapper/interface/codec.h @@ -50,5 +50,7 @@ void WriteSkiffPg(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxe extern "C" void ReadSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, NKikimr::NUdf::TUnboxedValue& value, TInputBuf& buf); extern "C" void WriteSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, TOutputBuf& buf); +std::shared_ptr<void> CreateMemoryArenaContext(); + } // namespace NCommon } // namespace NYql |