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

Function MakeLotsOfCsvColumns

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

Generate test data with the given number of columns.

Source from the content-addressed store, hash-verified

825
826// Generate test data with the given number of columns.
827std::string MakeLotsOfCsvColumns(int32_t num_columns) {
828 std::string values, header;
829 header.reserve(num_columns * 10);
830 values.reserve(num_columns * 10);
831 for (int x = 0; x < num_columns; x++) {
832 if (x != 0) {
833 header += ",";
834 values += ",";
835 }
836 header += "c" + std::to_string(x);
837 values += std::to_string(x);
838 }
839
840 header += "\n";
841 values += "\n";
842 return MakeCSVData({header, values});
843}
844
845TEST(BlockParser, LotsOfColumns) {
846 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