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

Method ReadFile

cpp/src/parquet/metadata_benchmark.cc:95–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 }
94
95 void ReadFile(std::shared_ptr<Buffer> contents) {
96 auto source = std::make_shared<BufferReader>(contents);
97 ReaderProperties props;
98 auto reader = ParquetFileReader::Open(source, props);
99 auto metadata = reader->metadata();
100 ARROW_CHECK_EQ(metadata->num_columns(), num_columns_);
101 ARROW_CHECK_EQ(metadata->num_row_groups(), num_row_groups_);
102 // There should be one row per row group
103 ARROW_CHECK_EQ(metadata->num_rows(), num_row_groups_);
104 reader->Close();
105 }
106
107 private:
108 int num_columns_;

Callers 1

ReadFileMetadataFunction · 0.80

Calls 5

metadataMethod · 0.45
num_columnsMethod · 0.45
num_row_groupsMethod · 0.45
num_rowsMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected