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

Method UnequalNumRowsBuffered

cpp/src/parquet/file_serialize_test.cc:206–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 void UnequalNumRowsBuffered(int64_t max_rows,
207 const std::vector<int64_t> rows_per_column) {
208 auto sink = CreateOutputStream();
209 auto gnode = std::static_pointer_cast<GroupNode>(this->node_);
210
211 std::shared_ptr<WriterProperties> props = WriterProperties::Builder().build();
212
213 auto file_writer = ParquetFileWriter::Open(sink, gnode, props);
214
215 RowGroupWriter* row_group_writer;
216 row_group_writer = file_writer->AppendBufferedRowGroup();
217
218 this->GenerateData(max_rows);
219 for (int col = 0; col < num_columns_; ++col) {
220 auto column_writer =
221 static_cast<TypedColumnWriter<TestType>*>(row_group_writer->column(col));
222 column_writer->WriteBatch(rows_per_column[col], this->def_levels_.data(), nullptr,
223 this->values_ptr_);
224 column_writer->Close();
225 }
226 row_group_writer->Close();
227 file_writer->Close();
228 }
229
230 void RepeatedUnequalRows() {
231 // Optional and repeated, so definition and repetition levels

Callers 1

TYPED_TESTFunction · 0.80

Calls 9

CreateOutputStreamFunction · 0.85
BuilderFunction · 0.70
buildMethod · 0.45
GenerateDataMethod · 0.45
columnMethod · 0.45
WriteBatchMethod · 0.45
dataMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected