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

Method CreateTestFile

cpp/src/parquet/stream_reader_test.cc:204–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202 }
203
204 void CreateTestFile() {
205 PARQUET_ASSIGN_OR_THROW(auto outfile,
206 ::arrow::io::FileOutputStream::Open(GetDataFile()));
207
208 auto file_writer = ParquetFileWriter::Open(outfile, GetSchema());
209
210 StreamWriter os{std::move(file_writer)};
211
212 TestData::Init();
213
214 for (auto i = 0; i < TestData::num_rows; ++i) {
215 os << TestData::GetBool(i);
216 os << TestData::GetString(i);
217 os << TestData::GetChar(i);
218 os << TestData::GetCharArray(i);
219 os << TestData::GetInt8(i);
220 os << TestData::GetUInt16(i);
221 os << TestData::GetInt32(i);
222 os << TestData::GetUInt64(i);
223 os << TestData::GetChronoMicroseconds(i);
224 os << TestData::GetFloat(i);
225 os << TestData::GetDouble(i);
226 os << EndRow;
227 }
228 }
229
230 StreamReader reader_;
231};

Callers

nothing calls this directly

Calls 2

GetStringFunction · 0.85
GetSchemaFunction · 0.50

Tested by

no test coverage detected