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

Method WriteStream

cpp/src/parquet/file_deserialize_test.cc:382–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380
381template <>
382void PageFilterTest<format::DataPageHeader>::WriteStream() {
383 for (int i = 0; i < kNumPages; ++i) {
384 // Vary the number of rows to produce different headers.
385 int32_t num_rows = i + 100;
386 total_rows_ += num_rows;
387 int data_size = i + 1024;
388 this->data_page_header_.__set_num_values(num_rows);
389 this->data_page_header_.statistics.__set_min_value("A" + std::to_string(i));
390 this->data_page_header_.statistics.__set_max_value("Z" + std::to_string(i));
391 this->data_page_header_.statistics.__set_null_count(0);
392 this->data_page_header_.statistics.__set_distinct_count(num_rows);
393 this->data_page_header_.__isset.statistics = true;
394 ASSERT_NO_FATAL_FAILURE(
395 this->WriteDataPageHeader(/*max_serialized_len=*/1024, data_size, data_size));
396 data_page_headers_.push_back(this->data_page_header_);
397 // Also write data, to make sure we skip the data correctly.
398 std::vector<uint8_t> faux_data(data_size);
399 ASSERT_OK(this->out_stream_->Write(faux_data.data(), data_size));
400 }
401 this->EndStream();
402}
403
404template <>
405void PageFilterTest<format::DataPageHeaderV2>::WriteStream() {

Callers 1

TYPED_TESTFunction · 0.45

Calls 13

to_stringFunction · 0.85
__set_num_valuesMethod · 0.80
__set_min_valueMethod · 0.80
__set_max_valueMethod · 0.80
__set_null_countMethod · 0.80
__set_distinct_countMethod · 0.80
WriteDataPageHeaderMethod · 0.80
push_backMethod · 0.80
EndStreamMethod · 0.80
__set_num_rowsMethod · 0.80
WriteDataPageHeaderV2Method · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected