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

Function ChunksToSingle

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

Source from the content-addressed store, hash-verified

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

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