Skip to content

Commit 71f1628

Browse files
fixes
1 parent 1ae2d56 commit 71f1628

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

ydb/core/formats/arrow/accessor/composite/accessor.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,16 @@ NArrow::NAccessor::IChunkedArray::TCurrentArrayAddress TCompositeChunkedArray::D
5555
return *result;
5656
}
5757

58+
std::shared_ptr<arrow::ChunkedArray> TCompositeChunkedArray::DoGetChunkedArray() const {
59+
std::vector<std::shared_ptr<arrow::Array>> chunks;
60+
for (auto&& i : Chunks) {
61+
auto arr = i->GetChunkedArray();
62+
AFL_VERIFY(arr->num_chunks());
63+
for (auto&& chunk : arr->chunks()) {
64+
chunks.emplace_back(chunk);
65+
}
66+
}
67+
return std::make_shared<arrow::ChunkedArray>(chunks);
68+
}
69+
5870
} // namespace NKikimr::NArrow::NAccessor

ydb/core/formats/arrow/accessor/composite/accessor.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ class TCompositeChunkedArray: public NArrow::NAccessor::IChunkedArray {
3333
return nullptr;
3434
}
3535
virtual TCurrentChunkAddress DoGetChunk(const std::optional<TCurrentChunkAddress>& chunkCurrent, const ui64 position) const override;
36-
virtual std::shared_ptr<arrow::ChunkedArray> DoGetChunkedArray() const override {
37-
AFL_VERIFY(false);
38-
return nullptr;
39-
}
36+
virtual std::shared_ptr<arrow::ChunkedArray> DoGetChunkedArray() const override;
4037

4138
TCompositeChunkedArray(std::vector<std::shared_ptr<NArrow::NAccessor::IChunkedArray>>&& chunks, const ui32 recordsCount,
4239
const std::shared_ptr<arrow::DataType>& type)

0 commit comments

Comments
 (0)