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

Method WriteStream

cpp/src/parquet/file_deserialize_test.cc:371–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369
370template <>
371void PageFilterTest<format::DataPageHeader>::WriteStream() {
372 for (int i = 0; i < kNumPages; ++i) {
373 // Vary the number of rows to produce different headers.
374 int32_t num_rows = i + 100;
375 total_rows_ += num_rows;
376 int data_size = i + 1024;
377 this->data_page_header_.__set_num_values(num_rows);
378 this->data_page_header_.statistics.__set_min_value("A" + std::to_string(i));
379 this->data_page_header_.statistics.__set_max_value("Z" + std::to_string(i));
380 this->data_page_header_.statistics.__set_null_count(0);
381 this->data_page_header_.statistics.__set_distinct_count(num_rows);
382 this->data_page_header_.__isset.statistics = true;
383 ASSERT_NO_FATAL_FAILURE(
384 this->WriteDataPageHeader(/*max_serialized_len=*/1024, data_size, data_size));
385 data_page_headers_.push_back(this->data_page_header_);
386 // Also write data, to make sure we skip the data correctly.
387 std::vector<uint8_t> faux_data(data_size);
388 ASSERT_OK(this->out_stream_->Write(faux_data.data(), data_size));
389 }
390 this->EndStream();
391}
392
393template <>
394void 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