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

Function GenerateRandomTable

cpp/src/arrow/adapters/orc/adapter_test.cc:211–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211std::shared_ptr<Table> GenerateRandomTable(const std::shared_ptr<Schema>& schema,
212 int64_t size, int64_t min_num_chunks,
213 int64_t max_num_chunks,
214 double null_probability) {
215 int num_cols = schema->num_fields();
216 ChunkedArrayVector cv;
217 for (int col = 0; col < num_cols; col++) {
218 cv.push_back(GenerateRandomChunkedArray(schema->field(col)->type(), size,
219 min_num_chunks, max_num_chunks,
220 null_probability));
221 }
222 return Table::Make(schema, cv);
223}
224
225void AssertTableWriteReadEqual(const std::vector<std::shared_ptr<Table>>& input_tables,
226 const std::shared_ptr<Table>& expected_output_table,

Callers 3

SchemaORCWriteReadTestFunction · 0.85
TEST_FFunction · 0.85
RunTestMethod · 0.85

Calls 6

push_backMethod · 0.80
MakeFunction · 0.50
num_fieldsMethod · 0.45
typeMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected