MCPcopy Create free account
hub / github.com/apache/arrow / ChunksToSingle

Function ChunksToSingle

cpp/src/parquet/arrow/reader.cc:89–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87namespace {
88
89::arrow::Result<std::shared_ptr<ArrayData>> ChunksToSingle(const ChunkedArray& chunked) {
90 switch (chunked.num_chunks()) {
91 case 0: {
92 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<Array> array,
93 ::arrow::MakeArrayOfNull(chunked.type(), 0));
94 return array->data();
95 }
96 case 1:
97 return chunked.chunk(0)->data();
98 default:
99 // ARROW-3762(wesm): If item reader yields a chunked array, we reject as
100 // this is not yet implemented
101 return Status::NotImplemented(
102 "Nested data conversions not implemented for chunked array outputs");
103 }
104}
105
106} // namespace
107

Callers 2

BuildArrayMethod · 0.85
forFunction · 0.85

Calls 6

MakeArrayOfNullFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
NotImplementedFunction · 0.50
num_chunksMethod · 0.45
typeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected