Skip to content

Commit 2d9caae

Browse files
json optimization usage fixes (#14748)
1 parent 1b2ad9e commit 2d9caae

File tree

111 files changed

+1070
-778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1070
-778
lines changed

ydb/library/formats/arrow/accessor/abstract/accessor.cpp renamed to ydb/core/formats/arrow/accessor/abstract/accessor.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ std::shared_ptr<IChunkedArray> IChunkedArray::DoApplyFilter(const TColumnFilter&
119119
}
120120
}
121121

122+
std::shared_ptr<IChunkedArray> IChunkedArray::ApplyFilter(const TColumnFilter& filter, const std::shared_ptr<IChunkedArray>& selfPtr) const {
123+
if (filter.IsTotalAllowFilter()) {
124+
return selfPtr;
125+
}
126+
if (filter.IsTotalDenyFilter()) {
127+
return TTrivialArray::BuildEmpty(GetDataType());
128+
}
129+
return DoApplyFilter(filter);
130+
}
131+
122132
TString IChunkedArray::TReader::DebugString(const ui32 position) const {
123133
auto address = GetReadChunk(position);
124134
return NArrow::DebugString(address.GetArray(), address.GetPosition());

ydb/library/formats/arrow/accessor/abstract/accessor.h renamed to ydb/core/formats/arrow/accessor/abstract/accessor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,7 @@ class IChunkedArray {
320320
}
321321

322322
public:
323-
std::shared_ptr<IChunkedArray> ApplyFilter(const TColumnFilter& filter) const {
324-
return DoApplyFilter(filter);
325-
}
323+
std::shared_ptr<IChunkedArray> ApplyFilter(const TColumnFilter& filter, const std::shared_ptr<IChunkedArray>& selfPtr) const;
326324

327325
NJson::TJsonValue DebugJson() const {
328326
NJson::TJsonValue result = NJson::JSON_MAP;

ydb/core/formats/arrow/accessor/abstract/constructor.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#pragma once
22

3-
#include <ydb/library/formats/arrow/accessor/abstract/accessor.h>
4-
#include <ydb/library/formats/arrow/accessor/common/chunk_data.h>
3+
#include <ydb/core/formats/arrow/accessor/abstract/accessor.h>
4+
#include <ydb/core/formats/arrow/accessor/common/chunk_data.h>
5+
56
#include <ydb/library/formats/arrow/protos/accessor.pb.h>
67
#include <ydb/services/bg_tasks/abstract/interface.h>
78

ydb/core/formats/arrow/accessor/abstract/ya.make

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ PEERDIR(
55
ydb/library/conclusion
66
ydb/services/metadata/abstract
77
ydb/library/actors/core
8-
ydb/library/formats/arrow/accessor/abstract
9-
ydb/library/formats/arrow/accessor/common
8+
ydb/core/formats/arrow/accessor/common
109
ydb/library/formats/arrow/protos
1110
)
1211

1312
SRCS(
1413
constructor.cpp
1514
request.cpp
15+
accessor.cpp
1616
)
1717

18+
GENERATE_ENUM_SERIALIZATION(accessor.h)
19+
1820
END()

0 commit comments

Comments
 (0)