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

Function MakeLotsOfCsvColumns

cpp/src/arrow/csv/parser_test.cc:905–921  ·  view source on GitHub ↗

Generate test data with the given number of columns.

Source from the content-addressed store, hash-verified

903
904// Generate test data with the given number of columns.
905std::string MakeLotsOfCsvColumns(int32_t num_columns) {
906 std::string values, header;
907 header.reserve(num_columns * 10);
908 values.reserve(num_columns * 10);
909 for (int x = 0; x < num_columns; x++) {
910 if (x != 0) {
911 header += ",";
912 values += ",";
913 }
914 header += "c" + std::to_string(x);
915 values += std::to_string(x);
916 }
917
918 header += "\n";
919 values += "\n";
920 return MakeCSVData({header, values});
921}
922
923TEST(BlockParser, LotsOfColumns) {
924 auto options = ParseOptions::Defaults();

Callers 1

TESTFunction · 0.85

Calls 3

to_stringFunction · 0.85
MakeCSVDataFunction · 0.85
reserveMethod · 0.45

Tested by

no test coverage detected